From: Magnus Henoch <mange@freemail.hu>
To: emacs-devel@gnu.org
Cc: 42@emacsbugs.donarmstrong.com
Subject: Change branch for HTTP chunking bug?
Date: Mon, 10 Mar 2008 11:47:55 +0100 [thread overview]
Message-ID: <87d4q2ua78.fsf@freemail.hu> (raw)
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
I recently committed the attached patch to trunk, fixing bug #42,
"Superfluous CR from HTTP chunked download":
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=42
Should this be changed on the Emacs 22 branch as well?
Magnus
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: url-http.el.patch --]
[-- Type: text/x-patch, Size: 707 bytes --]
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 7b29eba..c9cecea 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -948,7 +948,11 @@ the end of the document."
(url-http-debug "Saw end of stream chunk!")
(setq read-next-chunk nil)
(url-display-percentage nil nil)
- (goto-char (match-end 1))
+ ;; Every chunk, even the last 0-length one, is
+ ;; terminated by CRLF. Skip it.
+ (when (looking-at "\r?\n")
+ (url-http-debug "Removing terminator of last chunk")
+ (delete-region (match-beginning 0) (match-end 0)))
(if (re-search-forward "^\r*$" nil t)
(url-http-debug "Saw end of trailers..."))
(if (url-http-parse-headers)
next reply other threads:[~2008-03-10 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 10:47 Magnus Henoch [this message]
2008-03-10 15:46 ` Change branch for HTTP chunking bug? Chong Yidong
2008-03-10 15:57 ` Stefan Monnier
2008-03-11 12:19 ` Magnus Henoch
2008-03-11 12:23 ` Thien-Thi Nguyen
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=87d4q2ua78.fsf@freemail.hu \
--to=mange@freemail.hu \
--cc=42@emacsbugs.donarmstrong.com \
--cc=emacs-devel@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).