File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -279,10 +279,9 @@ def _load_method_and_content_type(self):
279
279
if not _hasattr (self , '_method' ):
280
280
self ._method = self ._request .method
281
281
282
- if self ._method == 'POST' :
283
- # Allow X-HTTP-METHOD-OVERRIDE header
284
- self ._method = self .META .get ('HTTP_X_HTTP_METHOD_OVERRIDE' ,
285
- self ._method )
282
+ # Allow X-HTTP-METHOD-OVERRIDE header
283
+ self ._method = self .META .get ('HTTP_X_HTTP_METHOD_OVERRIDE' ,
284
+ self ._method )
286
285
287
286
def _load_stream (self ):
288
287
"""
Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ def test_x_http_method_override_header(self):
66
66
request = Request (factory .post ('/' , {'foo' : 'bar' }, HTTP_X_HTTP_METHOD_OVERRIDE = 'DELETE' ))
67
67
self .assertEqual (request .method , 'DELETE' )
68
68
69
+ request = Request (factory .get ('/' , {'foo' : 'bar' }, HTTP_X_HTTP_METHOD_OVERRIDE = 'DELETE' ))
70
+ self .assertEqual (request .method , 'DELETE' )
71
+
69
72
70
73
class TestContentParsing (TestCase ):
71
74
def test_standard_behaviour_determines_no_content_GET (self ):
You can’t perform that action at this time.
0 commit comments