From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Stout Newsgroups: gmane.emacs.bugs Subject: bug#16345: 24.3; url-http sometimes closes connection prematurely Date: Sun, 5 Jan 2014 11:59:38 -0800 Message-ID: References: <4u1u0n71jo.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0116117e75968504ef3e96c1 X-Trace: ger.gmane.org 1388952077 27353 80.91.229.3 (5 Jan 2014 20:01:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Jan 2014 20:01:17 +0000 (UTC) Cc: 16345@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 05 21:01:23 2014 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 1Vztst-0007UC-Og for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Jan 2014 21:01:19 +0100 Original-Received: from localhost ([::1]:59244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vztst-0000bU-EC for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Jan 2014 15:01:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vztsh-0000Ym-FY for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 15:01:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vztsc-00016F-N6 for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 15:01:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vztsc-000169-Jc for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 15:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vztsc-0007Et-2B for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2014 15:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: James Stout Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2014 20:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16345 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16345-submit@debbugs.gnu.org id=B16345.138895200827709 (code B ref 16345); Sun, 05 Jan 2014 20:01:01 +0000 Original-Received: (at 16345) by debbugs.gnu.org; 5 Jan 2014 20:00:08 +0000 Original-Received: from localhost ([127.0.0.1]:36780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vztri-0007Cq-V7 for submit@debbugs.gnu.org; Sun, 05 Jan 2014 15:00:07 -0500 Original-Received: from mail-oa0-f43.google.com ([209.85.219.43]:39877) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vztrb-0007Bn-4d for 16345@debbugs.gnu.org; Sun, 05 Jan 2014 15:00:04 -0500 Original-Received: by mail-oa0-f43.google.com with SMTP id m1so248728oag.2 for <16345@debbugs.gnu.org>; Sun, 05 Jan 2014 11:59:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=RftyNXPOpLd3paUkv8nVPjHrJrKWUEsyGXUq0tfFpjs=; b=A1B+YDJJ6V+Iyp9fQVSRdqHDBvDHKtWVOc4dhAU8R25FjTMM8e3HaYtQtFN6vrCMpX 49p+RJBSlHZs/cMdSZMlD0wgdRk0dLwelaBK6skB7pGKHnlEYko48jLG+l2OjO7qWc3m xuCbKb/QrpPp6NIaDedjWbxEAdkcn6Hu7Rr/ppoN3D4mfHcCgeW6OuIwjnS3Z+a8Iirc +xkFokWBo/KHoM+YPC8pVunTX0ZNG7xBUZM7qXmZqY9YjoWQe2M0SSlYbov9DOm1UwhC wPk+RPkoYj//JVK8R/af5aG+UIvoS9LfoFSamgPWnA79iEd7qQv2Znlh59mu0fvro5Tu tLFg== X-Received: by 10.60.161.229 with SMTP id xv5mr49204093oeb.20.1388951998140; Sun, 05 Jan 2014 11:59:58 -0800 (PST) Original-Received: by 10.76.18.167 with HTTP; Sun, 5 Jan 2014 11:59:38 -0800 (PST) In-Reply-To: <4u1u0n71jo.fsf@fencepost.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:83024 Archived-At: --089e0116117e75968504ef3e96c1 Content-Type: text/plain; charset=ISO-8859-1 Hi Glenn, Yep, that fix works for me, thanks! Next time I'll be sure to check resolved bugs (I only checked open ones) and the source code trunk. I did notice that only one instance of the regular expression was changed. I'm not using chunked encoding with trailers, so it's hard for me to verify whether this indeed is a bug, but I think this line also needs to be fixed: http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/head:/lisp/url/url-http.el#L1037 Best, James On Sat, Jan 4, 2014 at 3:46 PM, Glenn Morris wrote: > James Stout wrote: > > > fix. The core problem is that the http library uses an incorrect regular > > expression when determining when the response headers are complete. It's > > looking for an empty line, and it uses "^\r*$", but it should use > "^\r?\n". > > Thanks, it already does so in Emacs trunk: > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13598#28 > > Perhaps you could check that trunk works correctly for you. > --089e0116117e75968504ef3e96c1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Glenn,

Yep, that fix works for me, thanks! Next = time I'll be sure to check resolved bugs (I only checked open ones) and= the source code trunk.

I did notice that only one instance of the r= egular expression was changed. I'm not using chunked encoding with trai= lers, so it's hard for me to verify whether this indeed is a bug, but I= think this line also needs to be fixed:
http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/h= ead:/lisp/url/url-http.el#L1037

Best,
James


On Sat, Jan 4, 2014 at 3:46 PM, Glenn Mo= rris <rgm@gnu.org> wrote:
James Stout wrote:

> fix. The core problem is that the http library uses an incorrect regul= ar
> expression when determining when the response headers are complete. It= 's
> looking for an empty line, and it uses "^\r*$", but it shoul= d use "^\r?\n".

Thanks, it already does so in Emacs trunk:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13598#28

Perhaps you could check that trunk works correctly for you.

--089e0116117e75968504ef3e96c1--