From 474780f9d6cdb593f82130d39b6a6ff7ef8b78e0 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sun, 26 Aug 2012 22:13:26 +0100 Subject: Remove 405 method not allowed ImmediateResponse --- djangorestframework/request.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'djangorestframework/request.py') diff --git a/djangorestframework/request.py b/djangorestframework/request.py index 2c0f0319..684f6591 100644 --- a/djangorestframework/request.py +++ b/djangorestframework/request.py @@ -207,8 +207,7 @@ class Request(object): """ Parse the request content. - May raise a 415 ImmediateResponse (Unsupported Media Type), or a - 400 ImmediateResponse (Bad Request). + May raise an `UnsupportedMediaType`, or `ParseError` exception. """ if self.stream is None or self.content_type is None: return (None, None) @@ -217,8 +216,7 @@ class Request(object): if parser.can_handle_request(self.content_type): return parser.parse(self.stream, self.META, self.upload_handlers) - raise UnsupportedMediaType("Unsupported media type in request '%s'" % - self._content_type) + raise UnsupportedMediaType(self._content_type) def _authenticate(self): """ -- cgit v1.2.3