Merge "Encode Location header in utf-8"

This commit is contained in:
Jenkins 2015-10-13 13:05:39 +00:00 committed by Gerrit Code Review
commit aa6449ce5d

View File

@ -634,7 +634,10 @@ class StackSerializer(serializers.JSONResponseSerializer):
def _populate_response_header(self, response, location, status):
response.status = status
response.headers['Location'] = location
if six.PY2:
response.headers['Location'] = location.encode('utf-8')
else:
response.headers['Location'] = location
response.headers['Content-Type'] = 'application/json'
return response