chicken-users
[Top][All Lists]
Advanced

[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 08:50:55 -0700
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

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.

> Not saying it isn't an http-egg bug, just that the symptom of the
> problem seems logical from a network-socket perspective.

The below is now irrelevant, having noticed the Content-Length, but
here it is anyways.

I'd agree if wget or curl had any problem with it, but both seem to
handle it just fine:

$ curl -D - -o - 
'http://ball:4444/selenium-server/driver/?cmd=getNewBrowserSession&1=*firefox&2=http%3A%2F%2Fwww.google.com'
HTTP/1.1 200 OK
Date: Wed, 12 Mar 2008 15:49:32 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,972140%

The "%" at the end of the last line is reverse-highlighted, and
that's my shell's symbol for "there's no newline here".

-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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]