unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Ian Price <ianprice90@googlemail.com>
To: Nikita Karetnikov <nikita.karetnikov@gmail.com>
Cc: 13095@debbugs.gnu.org, "Ludovic Courtès" <ludo@gnu.org>
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	[thread overview]
Message-ID: <87sj7g9sp6.fsf@Kagami.home> (raw)
In-Reply-To: <87wqws9um4.fsf@Kagami.home> (Ian Price's message of "Sat, 08 Dec 2012 20:06:27 +0000")


Okay so, chunked encoding was a red herring on my part. I saw the
#<input: r6rs-custom-binary-input-p…> 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"





  reply	other threads:[~2012-12-08 20:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 23:20 bug#13095: http-get: Throw to key `bad-response' with args `("EOF while reading response body: ...)' Nikita Karetnikov
2012-12-08 19:59 ` Ian Price
2012-12-08 20:06   ` Ian Price
2012-12-08 20:47     ` Ian Price [this message]
     [not found]       ` <87d2ykqkiy.fsf@zigzag.favinet>
2012-12-08 23:39         ` Ludovic Courtès
2012-12-10 13:45           ` dsmich
2013-01-12 14:47       ` Ian Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj7g9sp6.fsf@Kagami.home \
    --to=ianprice90@googlemail.com \
    --cc=13095@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=nikita.karetnikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).