OSX WebDav Client

In working on my custom WebDAV server, I discovered an interesting note about the OSX built-in WebDAV client. First of all, if you use finder to copy files (instead of cp in terminal), it sends all files over in chunked transfer-encoding. This is entirely allowed within the WebDAV specification, but it doesn't help that they also send it using the WRONG header. They send the encoding method as "Chunked" instead of "chunked".

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.


Comments

Grey Force said…
thanks a million for the tip.
fedup said…
This comment has been removed by the author.
andymichael436 said…
a blog on the topic of web designing is such a great thing to discuss on as the tech blogs helps students in their studies and some of the people also having trouble in completing the assignment and for that i am here to suggest you all about coursework writing help service from where you can get the best help and also get the best grades of which you desired for.
Essien said…
Exceedingly valuable and specifically permitted associates of information shared. It is a pleasure for me to achieve your pursuits of marvelous posting. Thank you so much for sharing inspiring info. fedpoly bali hnd admission forms out
Amy Jhons said…
In Orange Province, a criminal attorney is essential for exploring lawful difficulties really. Represent considerable authority in nearby regulations and techniques, they offer hearty guard against criminal accusations. An Orange District criminal legal advisor gives master direction and portrayal, pushing for your freedoms and going for the gold. Whether having to deal with penalties for offenses or serious crimes, they steadily create guard techniques custom fitted to your case. Trust they would say and obligation to safeguard your future and accomplish the most ideal goal in your legitimate matter.orange county criminal lawyer