While working with Python Paste, I found that chunked encoding wasn't supported at all, so I switched over to using CherryPy. After testing locally and getting everything to work (CherryPy apparently ignores case), I deployed this system to production behind an apache server to add in SSL support (Yes, I plan to use Nginx in the future, but we have apache set up here already). After setting up the proxy, I noticed that I could no longer send files to my WebDAV server and a strange message was appearing in the apache error.log:
[error] proxy: Chunked Transfer-Encoding is not supported
[error] [client xxx.xxx.xxx.xxx] Handler for proxy-server returned invalid result code 22
After a lot of googling, I found a single page (written in german), which describes the issue:
The end result was that I had to enable mod_headers, and place this line in my apache config under the virtual host:
RequestHeader edit Transfer-Encoding Chunked chunked early
This fixes the header before mod_proxy gets to it and changes the "Chunked" to "chunked" which tells apache how to handle the request body.
2 comments:
thanks a million for the tip.
Post a Comment