all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type
@ 2018-10-08  9:03 Michael Albinus
  2018-10-08  9:07 ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2018-10-08  9:03 UTC (permalink / raw)
  To: 32983


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.

See also the related bug#32941.


In GNU Emacs 27.0.50 (build 48, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-08-31 built on detlef
Repository revision: 6f3cf12e4fb6c810ebf37c8819dc2ee39b02199e
System Description: Ubuntu 18.04.1 LTS

Recent messages:
Reading active file via nnml...done
Reading active file via nndraft...done
Checking new news...done
No more unseen articles [2 times]
Saving /home/albinus/.newsrc.eld...
Saving file /home/albinus/.newsrc.eld...
Wrote /home/albinus/.newsrc.eld
Saving /home/albinus/.newsrc.eld...done
Contacting host: debbugs.gnu.org:443 [2 times]
Opening nndoc server on /tmp/gnus-temp-group-IHeMhW-ephemeral...done

Configured using:
 'configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CFLAGS=-O0 -g3 -gdwarf-4''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Lisp Interaction

Minor modes in effect:
  erc-notify-mode: t
  erc-notifications-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  icomplete-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.15/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.15/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.15/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.15/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.15/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.15/debbugs-browse
~/lisp/telepathy hides /home/albinus/.emacs.d/elpa/telepathy-20131209.1258/telepathy
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/27.0.50/lisp/net/tramp
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/27.0.50/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-loaddefs
~/lisp/dbus hides /usr/local/share/emacs/27.0.50/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-cache

Features:
(shadow emacsbug nndoc gnus-dup crm debbugs-gnu add-log debbugs
soap-client warnings rng-xsd rng-dt rng-util xsd-regexp time-stamp
timezone url-http url-gw url-cache url-auth eww mm-url url-queue url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf flow-fill mailalias sort gnus-cite url-util shr
text-property-search svg dom browse-url qp mm-archive mail-extr
gnus-async gnus-bcklg nnir gnus-ml pop3 utf-7 nndraft nnmh nnml gnutls
network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap
gnus-cache gnus-sum nnnil smtpmail sendmail gnus-demon nntp gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec
epa mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr
wid-edit term/xterm xterm elec-pair erc-notify erc-networks
erc-desktop-notifications erc-match notifications dbus xml erc-goodies
erc erc-backend erc-compat thingatpt pp erc-loaddefs cperl-mode time
tramp-sh kubernetes-tramp lxc-tramp docker-tramp tramp-cache
vagrant-tramp dash term disp-table ehelp tramp trampver tramp-compat
tramp-loaddefs ucs-normalize shell pcomplete comint ansi-color ring
parse-time format-spec advice ido jka-compr icomplete time-date paren vc
vc-dispatcher dired dired-loaddefs mule-util rx edmacro kmacro
slime-autoloads info finder-inf package let-alist derived pcase cl-extra
help-mode easymenu url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq
byte-opt gv bytecomp byte-compile cconv epg epg-config subr-x
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 528045 35301)
 (symbols 48 50305 1)
 (strings 32 115665 7529)
 (string-bytes 1 3660626)
 (vectors 16 56147)
 (vector-slots 8 967906 12534)
 (floats 8 346 503)
 (intervals 56 4627 770)
 (buffers 992 32))





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type
  2018-10-08  9:03 bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type Michael Albinus
@ 2018-10-08  9:07 ` Michael Albinus
  2018-10-16 14:38   ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2018-10-08  9:07 UTC (permalink / raw)
  To: 32983

Michael Albinus <michael.albinus@gmx.de> 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---






^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type
  2018-10-08  9:07 ` Michael Albinus
@ 2018-10-16 14:38   ` Michael Albinus
  2018-10-16 15:34     ` Thomas Fitzsimmons
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2018-10-16 14:38 UTC (permalink / raw)
  To: 32983; +Cc: Alex Harsanyi, Thomas Fitzsimmons

Michael Albinus <michael.albinus@gmx.de> writes:

> The following patch works for me. Shall be reviewed by the soap-client
> maintainers.

Ping. Thomas, Alex, could you pls comment?

Thanks, and best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type
  2018-10-16 14:38   ` Michael Albinus
@ 2018-10-16 15:34     ` Thomas Fitzsimmons
  2018-10-16 17:48       ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Fitzsimmons @ 2018-10-16 15:34 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Alex Harsanyi, 32983

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> writes:

> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> The following patch works for me. Shall be reviewed by the soap-client
>> maintainers.
>
> Ping. Thomas, Alex, could you pls comment?
>
> Thanks, and best regards, Michael.

The patch looks OK to me.  I tested it in my Excorporate setup, against
Emacs 24.1 (which soap-client must be compatible back to), and it works,
so I think this is fine to go in.  Do you want to push it to emacs.git
master, bumping the soap-client.el micro version?  That will trigger its
rebuild in GNU ELPA tonight, alongside (presumably) the updated debbugs
that depends on it.

Alex or I will have to also push the patch to
https://github.com/alex-hhh/emacs-soap-client.git afterwards.

Thanks,
Thomas





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type
  2018-10-16 15:34     ` Thomas Fitzsimmons
@ 2018-10-16 17:48       ` Michael Albinus
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2018-10-16 17:48 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Alex Harsanyi, 32983-done

Version: 27.1

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> Hi Michael,

Hi Thomas,

> The patch looks OK to me.  I tested it in my Excorporate setup, against
> Emacs 24.1 (which soap-client must be compatible back to), and it works,
> so I think this is fine to go in.  Do you want to push it to emacs.git
> master, bumping the soap-client.el micro version?  That will trigger its
> rebuild in GNU ELPA tonight, alongside (presumably) the updated debbugs
> that depends on it.

Done. I've increased the version of soap-client.el to 3.1.5. I'll change
the debbugs package once the new soap-client has reached the ELPA repository.

Closing the bug.

> Thanks,
> Thomas

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-16 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08  9:03 bug#32983: 27.0.50; soap-client shall accept "multipart/related" Content-type Michael Albinus
2018-10-08  9:07 ` Michael Albinus
2018-10-16 14:38   ` Michael Albinus
2018-10-16 15:34     ` Thomas Fitzsimmons
2018-10-16 17:48       ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.