From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Change branch for HTTP chunking bug? Date: Mon, 10 Mar 2008 11:46:51 -0400 Message-ID: <87ejaik2dw.fsf@stupidchicken.com> References: <87d4q2ua78.fsf@freemail.hu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205164168 31983 80.91.229.12 (10 Mar 2008 15:49:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2008 15:49:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 16:49:55 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JYkG9-00045p-Ek for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 16:49:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYkFb-0002pk-As for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 11:49:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYkFV-0002nn-0F for emacs-devel@gnu.org; Mon, 10 Mar 2008 11:49:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYkFP-0002nK-Ed for emacs-devel@gnu.org; Mon, 10 Mar 2008 11:49:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYkFP-0002nH-6Z for emacs-devel@gnu.org; Mon, 10 Mar 2008 11:49:07 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JYkFP-0002eH-1V for emacs-devel@gnu.org; Mon, 10 Mar 2008 11:49:07 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 773D84E401; Mon, 10 Mar 2008 11:46:51 -0400 (EDT) In-Reply-To: <87d4q2ua78.fsf@freemail.hu> (Magnus Henoch's message of "Mon\, 10 Mar 2008 11\:47\:55 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92043 Archived-At: Magnus Henoch writes: > 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 > > 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) Looks OK. Please check it into Emacs 22 (assuming it's been tested).