]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Bug#32983
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 16 Oct 2018 17:44:16 +0000 (19:44 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 16 Oct 2018 17:44:16 +0000 (19:44 +0200)
* lisp/net/soap-client.el: Bump version to 3.1.5.
(soap-parse-server-response): Handle also "multipart/related"
Content-Type.  (Bug#32983)

lisp/net/soap-client.el

index f5de05dc3d706804dccae9e959f7c928ff0eeef9..7c409665e44a1dfe9629671417f17623a6e65c7d 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
 ;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
 ;; Created: December, 2009
-;; Version: 3.1.4
+;; Version: 3.1.5
 ;; Keywords: soap, web-services, comm, hypermedia
 ;; Package: soap-client
 ;; Homepage: https://github.com/alex-hhh/emacs-soap-client
@@ -2337,6 +2337,14 @@ traverse an element tree."
 (defun soap-parse-server-response ()
   "Error-check and parse the XML contents of the current buffer."
   (let ((mime-part (mm-dissect-buffer t t)))
+    (when (and
+           (equal (mm-handle-media-type mime-part) "multipart/related")
+           (equal (get-text-property 0 'type (mm-handle-media-type mime-part))
+                  "text/xml"))
+      (setq mime-part
+            (mm-make-handle
+             (get-text-property 0 'buffer (mm-handle-media-type mime-part))
+             `(,(get-text-property 0 'type (mm-handle-media-type mime-part))))))
     (unless mime-part
       (error "Failed to decode response from server"))
     (unless (equal (car (mm-handle-type mime-part)) "text/xml")