unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Change branch for HTTP chunking bug?
Date: Mon, 10 Mar 2008 11:57:04 -0400	[thread overview]
Message-ID: <jwvlk4qr2we.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d4q2ua78.fsf@freemail.hu> (Magnus Henoch's message of "Mon, 10 Mar 2008 11:47:55 +0100")

> 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?

It seems that the bug is also present on the 22 branch.  I'm not sure
how serious it is compared to the risk of introducing more bugs.
How confident are you that this is the right fix and that it will not
break anything currently working?


        Stefan


> 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)




  parent reply	other threads:[~2008-03-10 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10 10:47 Change branch for HTTP chunking bug? Magnus Henoch
2008-03-10 15:46 ` Chong Yidong
2008-03-10 15:57 ` Stefan Monnier [this message]
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=jwvlk4qr2we.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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).