Subject: bug#23225: 25.1.50; url-retrieve-synchronously having trouble with some https URLs

From: [email-masked] (João Távora)
Date: Tue, 05 Apr 2016 19:30:12 +0100

Hello maintainers,

In the latest trunk, url-retrieve-synchronously is having trouble with
some https URLS. In the Emacs -Q scratch buffer, this returns the empty string:

  (with-current-buffer (url-retrieve-synchronously
    "https://melpa.org/packages/yascroll-20150315.605.el")
    (buffer-string))

But this works perfectly

  (with-current-buffer (url-retrieve-synchronously "https://google.com/")
    (buffer-string))

  (with-current-buffer (url-retrieve-synchronously "http://google.com/")
    (buffer-string))

No ideia why it works on google and gmail.

The misbehaving propagated silently and I came across this using M-x
package-install RET ... RET, which magically compiles a 0-byte package.

I think the protocol for url-retrieve-synchornously could be
revised. Its users seem to expect it to return nil or at least a
non-buffer if something went wrong, but that's clearly not what happened
here. Perhaps it should error.

Anyway, the buffer process is failing silently. A lower-level `url-retrieve'
doesn't even call its callback.

I'll try to debug a bit further if I find the time, in the meantime
here's a report.

João