From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type Date: Mon, 08 Oct 2018 11:07:44 +0200 Message-ID: <87woqs7qn3.fsf@gmx.de> References: <871s9095f9.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538989573 23024 195.159.176.226 (8 Oct 2018 09:06:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2018 09:06:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 32983@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 11:06:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9RUP-0005sO-1a for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 11:06:09 +0200 Original-Received: from localhost ([::1]:45176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9RWV-0006RS-Fa for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 05:08:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9RWK-0006RM-Qj for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 05:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9RWH-0001I0-2V for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 05:08:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35623) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9RWG-0001Ho-Ne for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 05:08:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g9RWE-0002kc-81 for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 05:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Oct 2018 09:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32983-submit@debbugs.gnu.org id=B32983.153898967410557 (code B ref 32983); Mon, 08 Oct 2018 09:08:02 +0000 Original-Received: (at 32983) by debbugs.gnu.org; 8 Oct 2018 09:07:54 +0000 Original-Received: from localhost ([127.0.0.1]:39881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9RW5-0002kD-SZ for submit@debbugs.gnu.org; Mon, 08 Oct 2018 05:07:54 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:49051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9RW3-0002jx-VD for 32983@debbugs.gnu.org; Mon, 08 Oct 2018 05:07:52 -0400 Original-Received: from detlef.gmx.de ([212.86.42.138]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lq9oW-1fVxy447pw-00dorZ for <32983@debbugs.gnu.org>; Mon, 08 Oct 2018 11:07:45 +0200 Original-Received: from detlef.gmx.de ([212.86.42.138]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lq9oW-1fVxy447pw-00dorZ for <32983@debbugs.gnu.org>; Mon, 08 Oct 2018 11:07:45 +0200 In-Reply-To: <871s9095f9.fsf@gmx.de> (Michael Albinus's message of "Mon, 08 Oct 2018 11:03:06 +0200") X-Provags-ID: V03:K1:sPTKJHKQtAlpOXlXc4YrtUUWSAQFnA1mmtaFMWxt/rft8mf34dp aeKAL8IyV3HBLMaoLYZQfFbuYuXwoXrGeO8kWZ9W32ysOZhuFaj0P5AWUX4Uu2T7QiaqyLn J5d+X/ZvXaIbMgOjiI0PKIZbZMsYHBfsBDWt8mzzXOiPFduzLMGLzI2+hLCbFd8ufUdNKce ByTepGk6LATGuG1ljXyBg== X-UI-Out-Filterresults: notjunk:1;V01:K0:Chqhq/WkEHM=:adoLIeHqsMAxwN7EGc/gQU 6XP3otIpPepkZguRvgFXKW+D7DUOrUqxc5abwEWWJVeLyHT0UzHvXAxdJ0C2yozJbW5uZ6AJ3 /5KZz4SOVN7+W06Mfzd8EvEcdRXwBthJFpsDIV8z7VaFH8RIdV2rV5KPP1bEncPpRevSKrf2c ZrERpgu3oom46tD8CNbtqUBx9t8kkLjHJLgoK83rF7X4+hWHZcutl8TMGVoMO4H9ruadjNcbN cIy/rcbo8z65ABQYtaXxkff7ImGpOtO0o1MPDwZeciICx2P2eTHbasmEtNBB+IWdTWs+ZUtKq Io2ybnKZ28m/ZkfXC0d0EGQZEMF36quqxe9B0FDlBd8fwmOxVLRfk+baTW8iYlvKFEdKdGyXw OMZkx0jRAG+s/rswJ5HN2M2N9mX4oH2dydBEtNiuj8cr+MGfDZ8QPbr6J7HX+khu3a5TrKc0G z3jm+jqtz0UQaU1FuRwAh7Q5VMqC3TcKF2YkY5mEMcCk1N/LryA/xC9StKujHHxDy2k/rNEwR xqpjxrXHVpXkSUDkbxrt2yNXwOhSz5pZSmOTMCd+EGtojpHOhhinn9MI/0GHd8VeeFLgLQNRA KnV4uu8+3S1UOG6s9QJi6U6DPe566X3OKVizGMvzd0tjNqO7n8xr10hLxuuw5B7lavU6zbVfE 1rUsCrKlPD6ilyDOTxtUF1eWhEDy6EEQxfTqKsRpyv/i3V/aQkKQ1uZeRdqh51ligqkv9B+g7 lw33gMtrY66KN+OWx55aJt02mzDRcgYCIMryRmuJIqRGX0o/+TKxj6njeJfI5+dUZrqPRafH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151005 Archived-At: Michael Albinus writes: > The soap-client checks HTTPS responses for a proper Content-type > "text/xml". However, not all SOAP servers return this. For example, the > Perl SOAP::Lite module returns sometimes the Content-type > "multipart/related". As an example one could load the GNU ELPA package > debbugs, and eval the form (debbugs-get-bug-log 25235) > > This shall be supported by soap-client. The following patch works for me. Shall be reviewed by the soap-client maintainers. --8<---------------cut here---------------start------------->8--- diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index f5de05dc3d..5c819636e6 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -2337,6 +2337,14 @@ soap-wsdl-resolve-references (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") --8<---------------cut here---------------end--------------->8---