Pylons/waitress — pull request #43 by BenAllums (2013-09-09 19:22:45+00:00)
Title: Patches for chunked PUT requests

Testing wsgidav with a variety of Python HTTP servers, I found waitress to be the only one that handles chunked PUT requests. I did encounter issues when using waitress with Mac OS X Finder WebDAV clients. It turns out that the Mac Finder handles files copies to WebDAV servers with chunked PUT requests.

Two issues showed up with waitress + wsgidav and Mac Finder clients:

1. waitress looked only for 'Transfer-Encoding: chunked'. The Mac Finder sends PUT requests with 'Transfer-Encoding: Chunked' (note the captiol 'C').
2. With item 1 addressed, waitress correctly converts a chunked PUT request into a standard PUT request. Unfortunately, it leaves the 'Transfer-Encoding: chunked' header in the environ. This leads WSGI apps, such as wsgidav, to attempt a chunked content read when the input is no longer chunked.