From: "R. P. Dillon" <rpdillon@gmail.com>
To: Ian Price <ianprice90@googlemail.com>
Cc: guile-user@gnu.org
Subject: Re: HTTP Request/Response questions
Date: Sun, 6 Nov 2011 08:55:56 -0800 [thread overview]
Message-ID: <CAO2OH19CLUQZ4yPf1YvbNY=x=YCQOAJRxYQxMpn7U41XEUUpzg@mail.gmail.com> (raw)
In-Reply-To: <m3d3d5v6ql.fsf@Kagami.home>
[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]
Thanks for your response, Ian. I don't know how I missed the (web client)
module, but it's right there in my info page.
I've been experimenting with it, but am having similar problem to those
outlined below. I'm going to start reading some of the code, but my
initial impression is that there's lots of loose interpretation (or at
least execution) of the specs in the servers I'm testing on (Google, CNN)
that are causing errors, e.g.
(http-get (string->uri "http://www.cnn.com"))
yields:
web/client.scm:109:4: In procedure http-get:
web/client.scm:109:4: Throw to key `bad-response' with args `("EOF while
reading response body: ~a bytes of ~a" (18576 106274))'.
In web/client.scm:
109:4 0 (http-get #<<uri> scheme: http userinfo: #f host: "www.cnn.com"
port: #f path: "" query: #f fragment: #f> #:port #<input-o…> …)
In your google.com web client example, the request seemed to return the
body of the document, but I'm still encountering the -1 expiration problem.
(Guile 2.0.3, though I think I'll go back to the git repo if I can work
around a recent compilation error that showed up).
It might be useful for me to see if I can make the parsing functions more
permissive, since they are (correctly) throwing errors for some common
servers. Unfortunately, I don't know that much about the innards of HTTP,
but I'm sure I can look at where the errors are generated and short circuit
some of the logic and see what happens. =)
Thanks for your help with this.
Rick
[-- Attachment #2: Type: text/html, Size: 2875 bytes --]
next prev parent reply other threads:[~2011-11-06 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 5:49 HTTP Request/Response questions R. P. Dillon
2011-11-06 11:18 ` Ian Price
2011-11-06 16:55 ` R. P. Dillon [this message]
2011-11-06 21:04 ` Ian Price
2011-11-07 8:24 ` Thien-Thi Nguyen
2011-11-08 18:46 ` Ian Price
2012-01-09 19:16 ` Andy Wingo
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='CAO2OH19CLUQZ4yPf1YvbNY=x=YCQOAJRxYQxMpn7U41XEUUpzg@mail.gmail.com' \
--to=rpdillon@gmail.com \
--cc=guile-user@gnu.org \
--cc=ianprice90@googlemail.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).