From 33af92e019fda70af7a4138972ee9780a9cc967a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 18 Aug 2014 15:14:30 +0100 Subject: [PATCH] Always uppercase X-Http-Method-Override methods. Closes #1718. --- rest_framework/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/request.py b/rest_framework/request.py index 40467c03d..dc696e36c 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -280,8 +280,8 @@ class Request(object): self._method = self._request.method # Allow X-HTTP-METHOD-OVERRIDE header - self._method = self.META.get('HTTP_X_HTTP_METHOD_OVERRIDE', - self._method) + if 'HTTP_X_HTTP_METHOD_OVERRIDE' in self.META: + self._method = self.META['HTTP_X_HTTP_METHOD_OVERRIDE'].upper() def _load_stream(self): """