From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: coroa@online.de (Jonas =?UTF-8?Q?H=C3=B6rsch?=) Newsgroups: gmane.emacs.bugs Subject: bug#13598: 24.3.50; url-http.el doesn't correctly parse headers when they are sent line-by-line Date: Thu, 07 Feb 2013 19:13:40 +0100 Message-ID: <87wquk3sbv.fsf@online.de> References: <87d2wluuu9.fsf@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360261852 6661 80.91.229.3 (7 Feb 2013 18:30:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2013 18:30:52 +0000 (UTC) To: 13598@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 07 19:31:12 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U3WFW-0007Sh-NU for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 19:31:06 +0100 Original-Received: from localhost ([::1]:52219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3WFD-0003AW-Ts for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 13:30:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3WF9-000397-Hm for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:30:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3WF5-0000j6-Cy for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:30:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3WF5-0000j0-9X for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:30:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U3WGQ-0006Ko-18 for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:32:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87d2wluuu9.fsf@online.de> Resent-From: coroa@online.de (Jonas =?UTF-8?Q?H=C3=B6rsch?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Feb 2013 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13598 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136026187724290 (code B ref -1); Thu, 07 Feb 2013 18:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2013 18:31:17 +0000 Original-Received: from localhost ([127.0.0.1]:42306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3WFh-0006Ji-7a for submit@debbugs.gnu.org; Thu, 07 Feb 2013 13:31:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41207) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3WFe-0006Jb-8Z for submit@debbugs.gnu.org; Thu, 07 Feb 2013 13:31:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3WEH-0000II-TU for submit@debbugs.gnu.org; Thu, 07 Feb 2013 13:29:50 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:33386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3WEH-0000ID-Qx for submit@debbugs.gnu.org; Thu, 07 Feb 2013 13:29:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3WEH-0002l7-1I for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:29:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3WEF-0000Hq-RC for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:29:48 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3WEF-0000Gl-M2 for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 13:29:47 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U3WEV-0006LC-RX for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 19:30:03 +0100 Original-Received: from e178209186.adsl.alicedsl.de ([85.178.209.186]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Feb 2013 19:30:03 +0100 Original-Received: from coroa by e178209186.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 07 Feb 2013 19:30:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178209186.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:HewRqEk5XBPUA8yP3xjhMA8pCLY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70825 Archived-At: On Thu, Jan 31 2013, Jonas Hoersch wrote: > changing the regex in (re-search-forward "^\r*$" nil t) to "^\r*\n" > solves the problem for me, but i'm unsure about what i might possibly be > breaking that way. i'm positive now, that changing the regex to "^\r+$" is the way to go. i would be happy to supply a patch, but i understand it is probably to trivial a matter to justify going through the legal requirements first. the following advice can serve as a hotfix: (defadvice url-http-wait-for-headers-change-function (around url-http-properly-wait-for-headers-advice activate) (save-excursion (goto-char (point-min)) (if (re-search-forward "^\r+$" nil t) ad-do-it (url-http-debug "Incomplete headers...: %d" (point-max)))))