Using Apache as a proxy with chunked encoding and digest authentication

apache-2.2apache-2.4chunkeddigestmod-proxy

I'm experiencing a strange problem. I'm using Apache as a proxy and submitting data using chunked encoding. The issue that when I try to use digest authentication in this configuration the proxy just hangs and eventually times out. The request never makes it to the server that is sitting behind Apache.

Here is my bare bones apache configuration.

<VirtualHost *:80>
    SetEnv proxy-sendcl 1
    SetEnv proxy-nokeepalive 1
    ProxyPass / http://localhost:8000/ timeout=0
    ProxyPassReverse / http://localhost:8000/
</VirtualHost>

And here is a basic curl command that I'm using which reproduces the issue:

curl --request POST --header "Transfer-Encoding: chunked" --insecure -F file=@myfile http://192.168.7.158/ --digest --user someuser:password

Is this a known issue? Are there any workarounds? Am seeing this on both Apache 2.2 and 2.4.

Best Answer

In my opinion, if you want to use chunked, you shoud set SetEnv "proxy-sendchunked" not "proxy-sendcl"