From 9d3153ed04aed78a977e064d0715baaf178ff88a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 14 Feb 2013 12:50:55 +0000 Subject: Fix broken clone_request --- rest_framework/request.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'rest_framework/request.py') diff --git a/rest_framework/request.py b/rest_framework/request.py index 47c009b2..bde391f9 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -44,10 +44,11 @@ def clone_request(request, method): Internal helper method to clone a request, replacing with a different HTTP method. Used for checking permissions against other methods. """ - ret = Request(request._request, - request.parsers, - request.authenticators, - request.parser_context) + ret = Request(request=request._request, + parsers=request.parsers, + authenticators=request.authenticators, + negotiator=request.negotiator, + parser_context=request.parser_context) ret._data = request._data ret._files = request._files ret._content_type = request._content_type @@ -57,6 +58,8 @@ def clone_request(request, method): ret._user = request._user if hasattr(request, '_auth'): ret._auth = request._auth + if hasattr(request, '_authenticator'): + ret._authenticator = request._authenticator return ret -- cgit v1.2.3