Subject: bug#22744: 24.5; url-retrieve callback is not invoked when http response content is empty

From: Shiyao Ma <[email-masked]>
Date: Sat, 20 Feb 2016 13:09:25 +0800

A working snippet is here:

https://bpaste.net/show/d2bd28c10f46

The callback paste-callback-bpaste is not invoked.

Turning on `url-debug', we can observe that the post response is a mere
http header with status 302, and no *data content*.

Regards.

**************************

In GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0, NS apple-appkit-1348.17)
 of 2015-08-11 on Mango
Configured using:
 `configure --prefix=/usr/local/Cellar/emacs/24.5
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/24.5/share/info/emacs --without-dbus
 --without-gnutls --with-ns --disable-ns-self-contained'

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

Major mode: Lisp Interaction

Minor modes in effect:
  elisp-slime-nav-mode: t
  eldoc-mode: t
  which-key-mode: t
  async-bytecomp-package-mode: t
  evil-jumper-mode: t
  evil-leader-mode: t
  evil-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-local-mode: t
  override-global-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-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
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
ad-handle-definition: `evil-mode' got redefined
Source file
`/Users/Eddie/.emacs.d/lisp/bundle/dpaste_de-20131015.525/dpaste_de.el'
newer than byte-compiled file
ad-handle-definition: `find-tag-noselect' got redefined
Loading term/xterm...done
6am is refreshing

Load-path shadows:
/Users/Eddie/.emacs.d/lisp/bundle/helm-20160121.2157/helm-multi-match hides
/Users/Eddie/.emacs.d/lisp/bundle/helm-core-20160121.2157/helm-multi-match

Features:
(shadow sort my-gnus mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
xterm elisp-slime-nav help-mode etags eldoc my-conf my-lisp my-org
finder-inf which-key my-paste paste url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap dpaste_de
web s ucs-normalize rx time-stamp dash browse-url json url-parse
auth-source gnus-util time-date mm-util mail-prsvr password-cache
url-vars my-tmux emux my-helm helm helm-source helm-multi-match helm-lib
dired helm-config helm-easymenu cl-macs gv async-bytecomp async my-evil
evil-jumper evil-leader evil evil-integration undo-tree diff evil-maps
evil-commands evil-command-window evil-types evil-search evil-ex
evil-macros evil-repeat evil-states evil-core advice help-fns
evil-common windmove thingatpt rect evil-digraphs evil-vars ring
my-utils my-graphics use-package diminish bind-key easy-mmode info
easymenu eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core
package epg-config edmacro kmacro cl-loaddefs cl-lib tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer 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 make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 314308 152941)
 (symbols 48 29606 97)
 (miscs 40 32 184)
 (strings 32 47915 121314)
 (string-bytes 1 1321209)
 (vectors 16 42457)
 (vector-slots 8 705376 93653)
 (floats 8 109 567)
 (intervals 56 217 74)
 (buffers 960 12))