emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change branch for HTTP chunking bug?


From: Stefan Monnier
Subject: Re: Change branch for HTTP chunking bug?
Date: Mon, 10 Mar 2008 11:57:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]