[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Hang problem with the http egg.
From: |
Robin Lee Powell |
Subject: |
Re: [Chicken-users] Hang problem with the http egg. |
Date: |
Wed, 12 Mar 2008 09:01:29 -0700 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
On Wed, Mar 12, 2008 at 08:50:55AM -0700, Robin Lee Powell wrote:
> On Wed, Mar 12, 2008 at 11:32:37AM -0400, Graham Fawcett wrote:
> > On Wed, Mar 12, 2008 at 11:22 AM, Robin Lee Powell
> > <address@hidden> wrote:
> >
> > > > Could it be that the body is the string "OK,585562" with no
> > > > terminating newline, and read-line hangs on it?
> > >
> > > Possible. If that's really the issue, you could try using
> > > read-lines or read-all. But if so, it's still an http egg
> > > bug, because http:GET hangs on it too.
> >
> > The blocking makes sense: if you ask a port to read an
> > indeterminately long string, it will eventually block until the
> > connection is closed.
> >
> > Perhaps get the Content-Length header from the response, and
> > (read-string n) where n is the Content-Length?
>
> There isn't one.
>
> Oh, wait, there *IS*. How did I miss that? Yeesh.
The answer is that the http egg eats it somehow; here's the headers
output from http:
headers: ((content-type . text/plain) (expires . Thu, 01 Jan 1970
00:00:00 GMT) (pragma . no-cache) (cache-control . no-cache)
(connection . close) (server . Jetty/5.1.x (Windows XP/5.1 x86
java/1.5.0_06) (date . Wed, 12 Mar 2008 15:41:57 GMT)).
I'm looking at the http egg code, and I don't see how that's
happening, but my *guess* is that it's dropping whatever the last
header is on the floor, because curl says that header is last:
The other possibility is that that header is failing the regex, but
a quick test with egrep shows that that doesn't seem to be the case.
HTTP/1.1 200 OK
Date: Wed, 12 Mar 2008 15:57:16 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.5.0_06
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 9
OK,436390%
And unfortunately, I have to stop working on this for today.
-Robin
--
Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo
Proud Supporter of the Singularity Institute - http://singinst.org/
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
- [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Tobia Conforto, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Graham Fawcett, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg.,
Robin Lee Powell <=
- Re: [Chicken-users] Hang problem with the http egg., Peter Bex, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/13
- Re: [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/13
- Re: [Chicken-users] Hang problem with the http egg., Peter Bex, 2008/03/13
- Re: [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/13
- Re: [Chicken-users] Hang problem with the http egg., Robin Lee Powell, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Hans Bulfone, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Graham Fawcett, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Hans Bulfone, 2008/03/12
- Re: [Chicken-users] Hang problem with the http egg., Alex Shinn, 2008/03/12