utils.coerce_put_post resets request.FILES
The current implementation of
utils.coerce_put_post seems to basically reset all the processing that has already been done on the request. An unexpected side-effect of this also seems to be, that request.FILES is regenerated from a now already empty datastream and therefor ends up empty on PUT requests.
Following implementation should work better in this regard since it simply copies the POST-content without actually causing any additional call of
request._load_post_and_files() when request.FILES is accessed.
def coerce_put_post(request): if request.method == 'PUT': request.method = 'POST' request.PUT = request.POST request.method = 'PUT' }}}