From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#36350: [2.2.5] =?UTF-8?Q?=E2=80=98read-headers=E2=80=99?= blocks, thereby breaking web servers Date: Mon, 24 Jun 2019 20:56:46 +0200 Message-ID: <87lfxq95ht.fsf@gnu.org> References: <87pnn3b7f1.fsf@gnu.org> <87h88f0zbv.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="192857"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: 36350@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 24 20:58:09 2019 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfUAL-000o3S-3U for guile-bugs@m.gmane.org; Mon, 24 Jun 2019 20:58:09 +0200 Original-Received: from localhost ([::1]:53942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfUAK-0000xb-67 for guile-bugs@m.gmane.org; Mon, 24 Jun 2019 14:58:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40228) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfUAF-0000xI-9N for bug-guile@gnu.org; Mon, 24 Jun 2019 14:58:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfUAE-0007vc-8w for bug-guile@gnu.org; Mon, 24 Jun 2019 14:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfUAE-0007vT-4s for bug-guile@gnu.org; Mon, 24 Jun 2019 14:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfUAD-0002pV-UX for bug-guile@gnu.org; Mon, 24 Jun 2019 14:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 24 Jun 2019 18:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36350 X-GNU-PR-Package: guile Original-Received: via spool by 36350-submit@debbugs.gnu.org id=B36350.156140262410611 (code B ref 36350); Mon, 24 Jun 2019 18:58:01 +0000 Original-Received: (at 36350) by debbugs.gnu.org; 24 Jun 2019 18:57:04 +0000 Original-Received: from localhost ([127.0.0.1]:57983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfU9H-0002l0-OS for submit@debbugs.gnu.org; Mon, 24 Jun 2019 14:57:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfU9F-0002kA-7o for 36350@debbugs.gnu.org; Mon, 24 Jun 2019 14:57:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hfU99-0006hj-PD; Mon, 24 Jun 2019 14:56:55 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43354 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hfU92-0003Qz-Q3; Mon, 24 Jun 2019 14:56:51 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Messidor an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: <87h88f0zbv.fsf@netris.org> (Mark H. Weaver's message of "Mon, 24 Jun 2019 11:36:41 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9366 Archived-At: Hi Mark, Mark H Weaver skribis: > Ludovic Court=C3=A8s writes: > >> ./meta/guile examples/web/hello.scm & >> wget -O - http://localhost:8080 >> >> You=E2=80=99ll notice that =E2=80=98wget=E2=80=99 hangs (never receives = a response) because the >> server is actually stuck in a read(2) call that will never complete, in >> =E2=80=98read-headers=E2=80=99. >> >> Reverting 73cde5ed7218a090ecee888870908af5445796f0 solves the problem. >> >> AIUI, before that commit, =E2=80=98read-header-line=E2=80=99 would read = exactly one >> line. After this change, it calls =E2=80=98lookahead-char=E2=80=99, whi= ch can block, >> and that=E2=80=99s exactly what=E2=80=99s happening here. > > Gah, indeed! > > Also, I see now that there was already some existing code to handle HTTP > continuation lines, before my commit referenced above, although it > neglects to fold the whitespace after the CRLF into a single SP octet. > I'm not sure how I failed to notice that. > > The commit should simply be reverted, I think. Pushed as commit > e1225d013ed8673382d6d8f9300dd6b175c8b820 on the stable-2.2 branch. > I tried leaving the new test in place, but it failed due to the lack of > whitespace folding in the previous code. OK, reverting sounds good to me. > I really messed up here, sorry. No problem. Perhaps we should consider releasing 2.0.6 soon and use that in Guix on =E2=80=98core-updates=E2=80=99. Thanks, Ludo=E2=80=99.