Commit f42e429c authored by Georgios D. Tsoukalas's avatar Georgios D. Tsoukalas
Browse files

snf-django proxy: preserve the response's headers

parent ee2f2534
......@@ -99,4 +99,8 @@ def proxy(request, proxy_base=None, target_base=None):
length = response.getheader('content-length', None)
data = response.read(length)
status = int(response.status)
return HttpResponse(data, status=status)
django_http_response = HttpResponse(data, status=status)
# do we need to exclude any headers here?
for name, value in response.getheaders():
django_http_response[name] = value
return django_http_response
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment