Hi all,

Using HA-Proxy version 1.3.19 2009/07/27.  Set-up is HA-Proxy balancing a
pool of Jetty servers.

We had a tomcat application using keep-alive that was having issues (kept on
opening many connections), so to stop that and other clients getting the
same problem we used the option httpclose which fixed the problem.

This though has added another issue when using digest authentication with
curl.  When sending to the HA-Proxy IP:-

**request**
> 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
> Host: ...........
> Accept: */*
> content-type:application/xml
> Content-Length: 0
> Expect: 100-continue

**response**
< HTTP/1.1 100 Continue
< Connection: close
* Empty reply from server
* Closing connection #0
curl: (52) Empty reply from server

It looks like HA-Proxy is sending 100-continue and not 401 and adding the
connection closed header.  If I use curl with the --http1.0 option, then it
works as expected, but I guess this is forcing Jetty to work in http 1.0
mode.


When using apache in front of HA-Proxy with both force-proxy-request-1.0 and
proxy-nokeepalive the request is successful.
**request**
> 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
> Host: ........
> Accept: */*
> content-type:application/xml
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 401 Unauthorized
< Date: Tue, 06 Apr 2010 09:56:32 GMT
< WWW-Authenticate: Digest realm....................
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 12
< Connection: close
<
* Closing connection #0
* Issue another request to this URL..............
> 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
> Host: ...........
> Accept: */*
> content-type:application/xml
> Content-Length: 450
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Date: Tue, 06 Apr 2010 09:56:32 GMT
< Server: ............
< Cache-Control: max-age=7200, must-revalidate
< Content-Length: 0
< Connection: close
< Content-Type: text/plain; charset=UTF-8
<
* Closing connection #0

It also works fine sending directly to Jetty, using http 1.1 and 1.0

So is it possible for me to get this working with 1.3? or will 1.4 support
of disabling keep-alive be a better option and I should try that?

Thanks,

Matt

Reply via email to