chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Hang problem with the http egg.


From: Robin Lee Powell
Subject: [Chicken-users] Hang problem with the http egg.
Date: Wed, 12 Mar 2008 00:45:22 -0700
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

I'm trying to write a Selenium egg, so I'm acting as a client to an
abnormal server.

Here's the relevant code:

     [http-thread (make-thread (lambda ()
                                 (call-with-values
                                   (lambda () (http:send-request url))
                                   (lambda (first-line headers input output)
                                     (format #t "first: ~A.\n" first-line)
                                     (format #t "headers: ~A.\n" headers)
                                     (list first-line (read-line input))))))]
It hangs at the read-line, eventually returning:

Warning (#<thread: thread6>): : read operation timed out: 3

        Call history:

        <eval>          [selenium::do-command] (format #t "first: ~A.\n" 
first-line)
        <eval>          [selenium::do-command] (format #t "headers: ~A.\n" 
headers)
        <eval>          [selenium::do-command] (list first-line (read-line 
input))
        <eval>          [selenium::do-command] (read-line input)        <--

The exact same thing happens if I use http:GET.

Here's a tcpdump of the exchange:

00:39:35.537301 IP (tos 0x0, ttl 64, id 9336, offset 0, flags [DF], proto TCP 
(6), length 202) chain.digitalkingdom.org.47357 > ball.digitalkingdom.org.4444: 
P, cksum 0x77b4 (correct), 1:163(162) ack 1 win 730
        0x0000:  4500 00ca 2478 4000 4006 0fae 4051 42a9  
address@hidden@address@hidden
        0x0010:  4051 42bd b8fd 115c fa7c 8688 1174 2c18  @QB....\.|...t,.
        0x0020:  5018 02da 77b4 0000 4745 5420 2f73 656c  P...w...GET./sel
        0x0030:  656e 6975 6d2d 7365 7276 6572 2f64 7269  enium-server/dri
        0x0040:  7665 722f 3f63 6d64 3d67 6574 4e65 7742  ver/?cmd=getNewB
        0x0050:  726f 7773 6572 5365 7373 696f 6e26 313d  rowserSession&1=
        0x0060:  2a66 6972 6566 6f78 2632 3d68 7474 7025  *firefox&2=http%
        0x0070:  3341 2532 4625 3246 7777 772e 676f 6f67  3A%2F%2Fwww.goog
        0x0080:  6c65 2e63 6f6d 2048 5454 502f 312e 300d  le.com.HTTP/1.0.
        0x0090:  0a48 6f73 743a 2062 616c 6c3a 3434 3434  .Host:.ball:4444
        0x00a0:  0d0a 436f 6e6e 6563 7469 6f6e 3a20 636c  ..Connection:.cl
        0x00b0:  6f73 650d 0a43 6f6e 7465 6e74 2d4c 656e  ose..Content-Len
        0x00c0:  6774 683a 2030 0d0a 0d0a                 gth:.0....
00:39:35.676651 IP (tos 0x0, ttl 127, id 22484, offset 0, flags [DF], proto TCP 
(6), length 40) ball.digitalkingdom.org.4444 > chain.digitalkingdom.org.47357: 
., cksum 0x20e1 (correct), 1:1(0) ack 163 win 65373
        0x0000:  4500 0028 57d4 4000 7f06 9df3 4051 42bd  E..(address@hidden@QB.
        0x0010:  4051 42a9 115c b8fd 1174 2c18 fa7c 872a  @QB..\...t,..|.*
        0x0020:  5010 ff5d 20e1 0000 0000 0000 0000 fbf4  P..]............
        0x0030:  eacf                                     ..
00:39:39.905357 IP (tos 0x0, ttl 127, id 23256, offset 0, flags [DF], proto TCP 
(6), length 288) ball.digitalkingdom.org.4444 > chain.digitalkingdom.org.47357: 
P, cksum 0x6f39 (correct), 1:249(248) ack 163 win 65373
        0x0000:  4500 0120 5ad8 4000 7f06 99f7 4051 42bd  address@hidden@QB.
        0x0010:  4051 42a9 115c b8fd 1174 2c18 fa7c 872a  @QB..\...t,..|.*
        0x0020:  5018 ff5d 6f39 0000 4854 5450 2f31 2e31  P..]o9..HTTP/1.1
        0x0030:  2032 3030 204f 4b0d 0a44 6174 653a 2057  .200.OK..Date:.W
        0x0040:  6564 2c20 3132 204d 6172 2032 3030 3820  ed,.12.Mar.2008.
        0x0050:  3037 3a33 393a 3435 2047 4d54 0d0a 5365  07:39:45.GMT..Se
        0x0060:  7276 6572 3a20 4a65 7474 792f 352e 312e  rver:.Jetty/5.1.
        0x0070:  7820 2857 696e 646f 7773 2058 502f 352e  x.(Windows.XP/5.
        0x0080:  3120 7838 3620 6a61 7661 2f31 2e35 2e30  1.x86.java/1.5.0
        0x0090:  5f30 360d 0a43 6f6e 6e65 6374 696f 6e3a  _06..Connection:
        0x00a0:  2063 6c6f 7365 0d0a 4361 6368 652d 436f  .close..Cache-Co
        0x00b0:  6e74 726f 6c3a 206e 6f2d 6361 6368 650d  ntrol:.no-cache.
        0x00c0:  0a50 7261 676d 613a 206e 6f2d 6361 6368  .Pragma:.no-cach
        0x00d0:  650d 0a45 7870 6972 6573 3a20 5468 752c  e..Expires:.Thu,
        0x00e0:  2030 3120 4a61 6e20 3139 3730 2030 303a  .01.Jan.1970.00:
        0x00f0:  3030 3a30 3020 474d 540d 0a43 6f6e 7465  00:00.GMT..Conte
        0x0100:  6e74 2d54 7970 653a 2074 6578 742f 706c  nt-Type:.text/pl
        0x0110:  6169 6e0d 0a0d 0a4f 4b2c 3538 3535 3632  ain....OK,585562
00:39:39.905371 IP (tos 0x0, ttl 64, id 9337, offset 0, flags [DF], proto TCP 
(6), length 40) chain.digitalkingdom.org.47357 > ball.digitalkingdom.org.4444: 
., cksum 0x1be7 (correct), 163:163(0) ack 249 win 864
        0x0000:  4500 0028 2479 4000 4006 104f 4051 42a9  
E..(address@hidden@address@hidden
        0x0010:  4051 42bd b8fd 115c fa7c 872a 1174 2d10  @QB....\.|.*.t-.
        0x0020:  5010 0360 1be7 0000                      P..`....

My *guess* is that http can't handle the entire body appearing in
the same packet as the headers, but that's only a guess.  It's also
possible the server is doing something stupid, but wget seems to
have no problem at all with what the server is doing.

Help?

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