Merge "Encode Location header in utf-8"
This commit is contained in:
commit
aa6449ce5d
@ -634,6 +634,9 @@ class StackSerializer(serializers.JSONResponseSerializer):
|
||||
|
||||
def _populate_response_header(self, response, location, status):
|
||||
response.status = status
|
||||
if six.PY2:
|
||||
response.headers['Location'] = location.encode('utf-8')
|
||||
else:
|
||||
response.headers['Location'] = location
|
||||
response.headers['Content-Type'] = 'application/json'
|
||||
return response
|
||||
|
Loading…
Reference in New Issue
Block a user