Modified to allow form overloading to take precedence over header.

This commit is contained in:
Dave Kuhn 2013-03-04 07:14:38 +11:00
parent 9dccbcbb38
commit 104614c600

View File

@ -232,15 +232,12 @@ class Request(object):
self._content_type = self.META.get('HTTP_CONTENT_TYPE',
self.META.get('CONTENT_TYPE', ''))
# Look for method override in header
self._method = self.META.get('HTTP_X_HTTP_METHOD_OVERRIDE', None)
if self._method:
return
self._perform_form_overloading()
# if the HTTP method was not overloaded, we take the raw HTTP method
if self._method:
self._method = self._request.method
if not _hasattr(self, '_method'):
# Method wasn't overloaded by hidden form element, so look for
# method override in header. If not present default to raw HTTP method
self._method = self.META.get('HTTP_X_HTTP_METHOD_OVERRIDE',
self._request.method)
def _load_stream(self):
"""