From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.bugs Subject: bug#13095: http-get: Throw to key `bad-response' with args `("EOF while reading response body: ...)' Date: Sat, 08 Dec 2012 20:47:49 +0000 Message-ID: <87sj7g9sp6.fsf@Kagami.home> References: <871uf0b9hl.fsf@Kagami.home> <87wqws9um4.fsf@Kagami.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp X-Trace: ger.gmane.org 1354999724 22426 80.91.229.3 (8 Dec 2012 20:48:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2012 20:48:44 +0000 (UTC) Cc: 13095@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= To: Nikita Karetnikov Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Dec 08 21:48:56 2012 Return-path: Envelope-to: guile-bugs@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 1ThRKP-0008Oe-SC for guile-bugs@m.gmane.org; Sat, 08 Dec 2012 21:48:54 +0100 Original-Received: from localhost ([::1]:46954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThRKD-0003Ju-Lk for guile-bugs@m.gmane.org; Sat, 08 Dec 2012 15:48:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThRKA-0003Jp-Ou for bug-guile@gnu.org; Sat, 08 Dec 2012 15:48:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThRK8-0006eW-UO for bug-guile@gnu.org; Sat, 08 Dec 2012 15:48:38 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThRK8-0006eB-RN for bug-guile@gnu.org; Sat, 08 Dec 2012 15:48:36 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ThRKY-000211-9n for bug-guile@gnu.org; Sat, 08 Dec 2012 15:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ian Price Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 08 Dec 2012 20:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13095 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 13095-submit@debbugs.gnu.org id=B13095.13549997067702 (code B ref 13095); Sat, 08 Dec 2012 20:49:02 +0000 Original-Received: (at 13095) by debbugs.gnu.org; 8 Dec 2012 20:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:33250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThRJy-00020B-0V for submit@debbugs.gnu.org; Sat, 08 Dec 2012 15:48:26 -0500 Original-Received: from mail-we0-f172.google.com ([74.125.82.172]:58477) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThRJw-000200-5N for 13095@debbugs.gnu.org; Sat, 08 Dec 2012 15:48:25 -0500 Original-Received: by mail-we0-f172.google.com with SMTP id r3so651990wey.3 for <13095@debbugs.gnu.org>; Sat, 08 Dec 2012 12:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=8mQxPIcoqwEhfxKMdXoIbwe3KlptCdEp8qhmNqG7xEs=; b=c2wbLVy4MrwqugPt1yxDwYN3/pyrWMKqBWgb1I7wMZv2uU7Q5KVrDhQ9K9Gyqpt6ty GrnV6GvsibpcV13wr+/L2WTZs8VVdB6mgAiedQ2yuoFifiJqmeLNsXTPA+VEbWJiv3Pq mIo4rLr+28uVSytDJ+aYmovif08rlipTJn9N5kkS9X6mRBEkYh/8M+0woztK7x0/vaf1 xTi2Pb75aQZy27HzZ5bqIsFDzsYdw86x2ggTdayBUp+4yBq5swkLqxhJJsL5DL08eUEZ RnLkaUUSeWVvF6VkwigKN6/D3GBxAEWRwWRAteUbvPNgEVIlhdrjif8TE7jjRzumyNtc 45AQ== Original-Received: by 10.180.94.226 with SMTP id df2mr4284980wib.11.1354999675978; Sat, 08 Dec 2012 12:47:55 -0800 (PST) Original-Received: from Kagami.home (host86-177-158-15.range86-177.btcentralplus.com. [86.177.158.15]) by mx.google.com with ESMTPS id u6sm4143413wif.2.2012.12.08.12.47.53 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 08 Dec 2012 12:47:54 -0800 (PST) In-Reply-To: <87wqws9um4.fsf@Kagami.home> (Ian Price's message of "Sat, 08 Dec 2012 20:06:27 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (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-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-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6660 Archived-At: Okay so, chunked encoding was a red herring on my part. I saw the # and jumped to conclusions. The actual port created was a "delimited port", which tries to read the appropriate amount of bytes according to the content-length header. Now, the problem, as I see it, is that when http-get (and http-get*) is called without the #:keep-alive? #t option, it will call (shutdown port 1)[0], which is to close the port for any outgoing traffic. This sounds fine in theory, but I think (I am no networking expert), that it is also preventing any requests for additional data. I do notice that it works correctly when I remove the calls to shutdown, which gives me confidence that it is the culprit, even if that analysis is not entirely correct (and I'm not sure it is) Removing the calls to shutdown should be fine, since when keep-alive? is #f, we close the ports after the read anyway. I'm going to withhold pushing a patch and closing this bug for the moment, until I'm satisfied of the reason why this is the problem. 0. I have checked that 1 corresponds to SHUT_WR on my platform -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"