On Wed, Apr 07, 2010 at 05:42:24PM +0100, Matt wrote: > On 7 April 2010 17:16, Matt <mattmora...@gmail.com> wrote: > > > Hi Willy, > > > > That trace is from curl using --verbose, looks like one empty line after > > Expect: 100-continue > > > > Here using --trace-ascii it definitely looks like an empty line after > > > > 00b7: content-type:application/xml > > 00d9: Content-Length: 0 > > 00ec: Expect: 100-continue > > 0102: > > == Info: HTTP 1.0, assume close after body > > <= Recv header, 26 bytes (0x1a) > > 0000: HTTP/1.0 502 Bad Gateway
So this probably means the server has closed after sending the 100-continue. > - option http-pretend-keepalive - works > - option http-pretend-keepalive and httpclose - same behaviour as before, > errors expected, httpclose will keep precedence over http-pretend-keepalive. > - option http-server-close - same behaviour as before, errors > - option http-server-close and http-pretend-keepalive - works Excellent, that was what I wanted to see ! > What exactly does pretend-keepalive do? It tells the server it will try to do keep-alive, but it still closes afterwards. The principle is that it just refrains from sending "Connection: close". So now we have the proof of a bug in Jetty : it closes the connection just after sending the "HTTP/1.1 100 Continue" preliminary response. You remember what I told you about certain environments where HTTP is redesigned without reading specs ;-) You should definitely use http-server-close combined with pretend-keepalive. This will : 1) workaround some of the server's bugs related to "Connection: close" 2) provide a better interactivity for your clients who will benefit from a keep-alive connection. I think I will release 1.4.4 soon since those bugs are becoming really annoying. In parallel, if someone could describe them to Jetty developers, that could help get the issue fixed. Regards, Willy