emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 c3ed95b: Move xsd:base64Binary decoding fix to de


From: Thomas Fitzsimmons
Subject: [Emacs-diffs] emacs-25 c3ed95b: Move xsd:base64Binary decoding fix to debbugs.el 0.9.1
Date: Wed, 16 Mar 2016 13:37:53 +0000

branch: emacs-25
commit c3ed95b1c57265138b7673ea37eef2d30204abcc
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>

    Move xsd:base64Binary decoding fix to debbugs.el 0.9.1
    
    * lisp/net/soap-client.el (soap-encode-xs-basic-type): Do not
    assume xsd:base64Binary values are UTF-8 strings.
    (soap-decode-xs-basic-type): Likewise.
    (soap-invoke): Document xsd:base64Binary handling.
---
 lisp/net/soap-client.el |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 7402464..12c9f41 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -538,7 +538,7 @@ This is a specialization of `soap-encode-value' for
                (base64Binary
                 (unless (stringp value)
                   (error "Not a string value for base64Binary"))
-                (base64-encode-string (encode-coding-string value 'utf-8)))
+                (base64-encode-string value))
 
                (otherwise
                 (error "Don't know how to encode %s for type %s"
@@ -682,7 +682,7 @@ This is a specialization of `soap-decode-type' for
                decimal byte float double duration)
          (string-to-number (car contents)))
         (boolean (string= (downcase (car contents)) "true"))
-        (base64Binary (decode-coding-string (base64-decode-string (car 
contents)) 'utf-8))
+        (base64Binary (base64-decode-string (car contents)))
         (anyType (soap-decode-any-type node))
         (Array (soap-decode-array node))))))
 
@@ -3096,7 +3096,11 @@ the SOAP request.
 NOTE: The SOAP service provider should document the available
 operations and their parameters for the service.  You can also
 use the `soap-inspect' function to browse the available
-operations in a WSDL document."
+operations in a WSDL document.
+
+NOTE: `soap-invoke' base64-decodes xsd:base64Binary return values
+into unibyte strings; these byte-strings require further
+interpretation by the caller."
   (apply #'soap-invoke-internal nil nil wsdl service operation-name 
parameters))
 
 (defun soap-invoke-async (callback cbargs wsdl service operation-name



reply via email to

[Prev in Thread] Current Thread [Next in Thread]