>
> 2010/4/6 Matt <mattmora...@gmail.com>:
>
> > < HTTP/1.1 100 Continue
> > < HTTP/1.1 200 OK
>
> Somehow this looks very odd to me :)
> Dunno if that helps, but we had problems with curl and digest
> authentication some time ago and solved it using
>
>  curl --digest -H "Expect:" [...]
>
> but we might have used a very old (buggy) version of curl.
> Please let me know if that helps in your case.
>
> Looking at the HTTP 1.1 docs it looks normal.  The client expects a 100
Continue or a final status code, the server can respond with 100 continue,
process, and then respond with a final code.

Adding the httpclose option causes haproxy to return the 100 but also add
connection: closed which rightly causes the client (curl) to not wait for
the final code and exit.

I rewrote the header to pass the request to Jetty in HTTP 1.0 with :-

reqirep ^(.*)(HTTP/1.1)(.*) \1HTTP/1.0\3

And i'm currently testing this, on the face of it - it appears to be
working, though it's slow and now and again a request returns a 502 always
after the 401, it looks like haproxy didn't get a response from the backend
:-

00000017:frontend.clihdr[0008:ffff]: User-Agent: curl/7.19.5
(i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
00000017:frontend.clihdr[0008:ffff]: Host: .......
00000017:frontend.clihdr[0008:ffff]: Accept: */*
00000017:frontend.clihdr[0008:ffff]: content-type:application/xml
00000017:frontend.clihdr[0008:ffff]: Content-Length: 448
00000017:frontend.clihdr[0008:ffff]: Expect: 100-continue
00000017:pool-00.srvcls[0008:0009]
00000017:pool-00.clicls[0008:0009]
00000017:pool-00.closed[0008:0009]

I've ran tests against the Jetty server with curl in http1.1 and http1.0 and
never have an issue.  If I remove my header rewrite and httpclose I get the
same throughput and success as if I was hitting Jetty directly.

I'm going to enable logging on Jetty and see what's been passed to it by HA
Proxy when the failure happens.

Thanks,

Matt

Reply via email to