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, 27 Dec 2015 15:28:32 -0800 Message-ID: References: <4u1u0n71jo.fsf@fencepost.gnu.org> <87fuyq2ril.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134c05a2002970527e98d15 X-Trace: ger.gmane.org 1451259023 10000 80.91.229.3 (27 Dec 2015 23:30:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Dec 2015 23:30:23 +0000 (UTC) Cc: 16345@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 28 00:30:15 2015 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 1aDKlS-0008F1-MX for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Dec 2015 00:30:14 +0100 Original-Received: from localhost ([::1]:43061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDKlS-0008J8-6X for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Dec 2015 18:30:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDKlL-0008Iq-FR for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 18:30:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDKlG-0004DL-Ni for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 18:30:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDKlG-0004Cv-KM for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 18:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aDKlG-0000B7-D7 for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 18:30: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, 27 Dec 2015 23:30:02 +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.1451258942591 (code B ref 16345); Sun, 27 Dec 2015 23:30:02 +0000 Original-Received: (at 16345) by debbugs.gnu.org; 27 Dec 2015 23:29:02 +0000 Original-Received: from localhost ([127.0.0.1]:45150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDKkH-00009P-RA for submit@debbugs.gnu.org; Sun, 27 Dec 2015 18:29:02 -0500 Original-Received: from mail-ig0-f180.google.com ([209.85.213.180]:38229) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aDKkD-00008x-RR for 16345@debbugs.gnu.org; Sun, 27 Dec 2015 18:29:00 -0500 Original-Received: by mail-ig0-f180.google.com with SMTP id mw1so13582103igb.1 for <16345@debbugs.gnu.org>; Sun, 27 Dec 2015 15:28:57 -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=MBEQMy7nkhnNpd2wNU6Ooz22QZqFKKUqw+DiTZAoxRU=; b=pTlvhGQyCjape2Weh45gfmODZEvkE0jcamJH9FGfeaalDx3KgPK1nTkdZJkXPGwYol ZM6Lwxbq6NLAlfTGQAnHVnD69F0lXeMWPvO2PxEEw1OeZe2YMXM5uA6kyF5W8vKASVQM W9RiwG/9VEyRJk65scBy384y3DfxJiJoz3VzeahGG31wuN4OFIE9IngjKVDscrqNBAjN Zh1KhHQTdm2318PauC/V/D6BHIr0mgEXkfWDeh8ByjjfEWN/PjMnVj/UH+UoauWflnim SO+NoHxD0DgSQ376LYRlPL+GrNQqWO/9mXWhh28EAByDJHJqUruudEHi/64gNZvXI8DM d5Cw== X-Received: by 10.50.150.35 with SMTP id uf3mr14906853igb.69.1451258932099; Sun, 27 Dec 2015 15:28:52 -0800 (PST) Original-Received: by 10.79.117.148 with HTTP; Sun, 27 Dec 2015 15:28:32 -0800 (PST) In-Reply-To: <87fuyq2ril.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:110878 Archived-At: --001a1134c05a2002970527e98d15 Content-Type: text/plain; charset=UTF-8 I'm suggesting the following change: Before: (if (re-search-forward "^\r*$" nil t) (url-http-debug "Saw end of trailers...")) After: (if (re-search-forward "^\r?\n" nil t) (url-http-debug "Saw end of trailers...")) This is based purely on my reading of the spec; this wasn't actually a problem I ran into (and it's just going to affect a debug message). On Fri, Dec 25, 2015 at 12:38 PM, Lars Ingebrigtsen wrote: > James Stout writes: > > > 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 > > Could you send a fix for the line in question? > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > --001a1134c05a2002970527e98d15 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm suggesting the following change:

Before: (if (re-search-forward "^\r*$" nil t)=C2=A0(url-http-de= bug "Saw end of trailers..."))
After: (if (re-searc= h-forward "^\r?\n" nil t)=C2=A0(url-http-debug "Saw end of t= railers..."))

This is based purely on my = reading of the spec; this wasn't actually a problem I ran into (and it&= #39;s just going to affect a debug message).

On Fri, Dec 25, 2015 at 12:38 PM, La= rs Ingebrigtsen <larsi@gnus.org> wrote:
James Stout <james.wolf.stout@gmail.com> writes:

> Yep, that fix works for me, thanks! Next time I'll be sure to chec= k resolved bugs (I only checked open ones) and the source code trunk.
>
> I did notice that only one instance of the regular expression was chan= ged. 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

Could you send a fix for the line in question?

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog:
http://lars.ingebrigtsen.no

--001a1134c05a2002970527e98d15--