From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien 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: Wed, 13 Feb 2013 18:19:15 +0100 Message-ID: <878v6st9m4.fsf@bzg.ath.cx> References: <87d2wluuu9.fsf@online.de> <87wquk3sbv.fsf@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1360775982 747 80.91.229.3 (13 Feb 2013 17:19:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2013 17:19:42 +0000 (UTC) Cc: 13598@debbugs.gnu.org To: coroa@online.de (Jonas =?UTF-8?Q?H=C3=B6rsch?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 13 18:20:00 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 1U5fzy-0002sX-6t for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 18:19:58 +0100 Original-Received: from localhost ([::1]:58940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5fze-0000Iq-Ix for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 12:19:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5fzc-0000Ib-6P for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 12:19:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5fzW-0004mN-SD for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 12:19:36 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5fzW-0004mJ-Ok for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 12:19:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U5g02-0004yf-PJ for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 12:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Feb 2013 17:20:02 +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: Original-Received: via spool by 13598-submit@debbugs.gnu.org id=B13598.136077599619109 (code B ref 13598); Wed, 13 Feb 2013 17:20:02 +0000 Original-Received: (at 13598) by debbugs.gnu.org; 13 Feb 2013 17:19:56 +0000 Original-Received: from localhost ([127.0.0.1]:54420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5fzv-0004y9-EN for submit@debbugs.gnu.org; Wed, 13 Feb 2013 12:19:55 -0500 Original-Received: from mail-wi0-f173.google.com ([209.85.212.173]:42864) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5fzt-0004y2-ET for 13598@debbugs.gnu.org; Wed, 13 Feb 2013 12:19:54 -0500 Original-Received: by mail-wi0-f173.google.com with SMTP id hq4so6014199wib.12 for <13598@debbugs.gnu.org>; Wed, 13 Feb 2013 09:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type :content-transfer-encoding; bh=gMNcYE0Ei9K8u+STGM41cquHXNzFjnioiNK+7ap9GBg=; b=T8rjJVBoAWfx/cZIRoIQCuKkfaNvmkSlxCPi7x5PTmcoG72SgXz9pdPfDmcqC5i6fT r7c2hmtQkETZ5Hmq2Dt6ytZhaFSvUFje8P28u/uMOHAv8hq+gQHrha9jVIJwuJV/cjb4 Se/CRE0sofA0vRsxsyKH/OKnY+CHeBa0WzE/onxrb25g023fLL5oLvrTWDuiJSjB7O+C 2DgF7FceEtjLAAV7fi1+Wx055cSYtqXAEVsIe33PU/79sUilq5TErK9jQo/LKoNn8HqB hV6BD7ys7jvqfHEUqg8q2DMKYtxBxG7cB+1slyF+5bfOb7ye8b1Z1Aw8O9SQ+PCyM4ht n94g== X-Received: by 10.194.92.65 with SMTP id ck1mr39794625wjb.54.1360775959915; Wed, 13 Feb 2013 09:19:19 -0800 (PST) Original-Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPS id ec3sm43747156wib.1.2013.02.13.09.19.17 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Feb 2013 09:19:18 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id 3A7081C20D18; Wed, 13 Feb 2013 18:19:15 +0100 (CET) In-Reply-To: <87wquk3sbv.fsf@online.de> ("Jonas =?UTF-8?Q?H=C3=B6rsch?="'s message of "Thu, 07 Feb 2013 19:13:40 +0100") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) 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:71186 Archived-At: Hi Jonas, coroa@online.de (Jonas Hörsch) writes: > 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))))) I confirm both the problem and the fix. It does not look critical though. Stefan, Glenn, should I commit the patch into trunk (or emacs-24)? -- Bastien