From 2daf085100b32fd4c13add0fcfa2dbb97722de4a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 5 Nov 2014 11:08:32 +0000 Subject: [PATCH] Copy accepted_renderer and accepted_media_type when cloing a request. Closes #1950. --- rest_framework/request.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rest_framework/request.py b/rest_framework/request.py index d43527421..096b30424 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -103,6 +103,10 @@ def clone_request(request, method): ret._auth = request._auth if hasattr(request, '_authenticator'): ret._authenticator = request._authenticator + if hasattr(request, 'accepted_renderer'): + ret.accepted_renderer = request.accepted_renderer + if hasattr(request, 'accepted_media_type'): + ret.accepted_media_type = request.accepted_media_type return ret