[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 22:20:43 -0700 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
On Wed, Mar 12, 2008 at 09:35:45PM -0700, Robin Lee Powell wrote:
> On Wed, Mar 12, 2008 at 06:40:56PM +0100, Peter Bex wrote:
> [snip]
> >
> > Where's this header coming from? Perhaps CURL is sending a
> > request that looks different to the server, causing it to send a
> > different response?
>
> Ah-ha! Right you are.
>
> curl is using HTTP/1.1. The http egg is using HTTP/1.0. If I
> force curl to HTTP/1.0, the same hang occurs.
>
> I consider this a bug both with the Selenium server (the hang
> itself) and with the http egg (no way to get it to use HTTP/1.1,
> even though it sends all the required headers). http:make-request
> supports it, but http:GET won't pass the arguments through.
Bug submitted with Selenium. Here's the patch for the http egg
problem. Two different styles of optionals; feel free to pick only
one, whoever applies this.
===================================================================
--- http-client.scm (revision 9407)
+++ http-client.scm (working copy)
@@ -179,10 +179,16 @@
"else return(NET_CONV(se->s_port));") )
(define (http:send-request req . more)
- (let-optionals more ([in #f]
- [out #f] )
+ (let-optionals more ([in #f]
+ [out #f]
+ [attributes '()]
+ [body ""]
+ [protocol 'HTTP/1.0]
+ [unpbody ""]
+ [ip "<unknown>"])
(let* ([req (if (string? req)
- (http:make-request 'GET req '(("Connection" . "close")))
+ (http:make-request
+ 'GET req (cons '("Connection" . "close") attributes) body
unpbody protocol ip)
req) ]
[as (remove (lambda (a) (string-ci=? (car a) "content-length"))
(http:request-attributes req))]
@@ -286,12 +292,17 @@
(http:request-attributes req)
string-ci=?)))))
-(define (http:GET req)
+(define (http:GET req
+ #!key (attributes '())
+ (body "")
+ (protocol 'HTTP/1.0)
+ (unpbody "")
+ (ip "<unknown>"))
(let ([req (cond ((http:request? req)
req)
((string? req)
(http:make-request
- 'GET req '(("Connection" . "close"))))
+ 'GET req (cons '("Connection" . "close") attributes) body
unpbody protocol ip))
(else
(error "http:GET" "unknown http request" req)))])
(let-values ([(header a i o) (http:send-request req)])
-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, 2008/03/12
- 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 <=
- 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
- Re: [Chicken-users] Hang problem with the http egg., Hans Bulfone, 2008/03/13
- Re: [Chicken-users] Hang problem with the http egg., Alan Post, 2008/03/12