unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: 35658@debbugs.gnu.org
Subject: bug#35658: 27.0.50; Problems with chunked/gzipped content in url-http
Date: Thu, 09 May 2019 14:26:49 -0400	[thread overview]
Message-ID: <8736ln5vrq.fsf@mouse.gnus.org> (raw)


To reproduce, say:

(url-retrieve-synchronously "https://www.facebook.com/verkstedetbar/events/?ref=page_internal")

This now appears to spin until Facebook closes the connection on their
side.

Looking at the data, it appears that Facebook outputs chunked gzipped
data, which is pretty normal.  What's not normal is that what's in the
http buffer is

HTTP/1.1 200 OK
Content-Encoding: gzip
[...]
Date: Thu, 09 May 2019 17:45:53 GMT
Transfer-Encoding: chunked
Connection: keep-alive

3^_\213^H^@^@^@^@^@^@...

(I've transliterated the binary data into what it looks like in the
buffer.)

I.e., there's not chunking header before that gzip file start.  Somehow,
either Emacs is removing the leading

4af^M

and replacing it with "3", or Facebook is outputting something odd.  I
tend to believe it's the former, since curl (and other programs)
understand the chunked data perfectly.

It's most strange...

If we switch gzip http off by saying

(setq url-mime-encoding-string nil)

then the chunked headers are correct and everything works.



In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-05-02 built on sandy
Repository revision: d4fa998c3142b5ae13664295dcf2136397b05f5a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 18.04.2 LTS


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






             reply	other threads:[~2019-05-09 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 18:26 Lars Ingebrigtsen [this message]
2019-05-10 19:21 ` bug#35658: 27.0.50; Problems with chunked/gzipped content in url-http Lars Ingebrigtsen
2019-05-15  4:56   ` Lars Ingebrigtsen
2019-05-15  5:13     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736ln5vrq.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=35658@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).