Skip to content

Commit

Permalink
[Minor] Improves Proxy response error status message
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Apr 29, 2019
1 parent 04c529f commit 9de3504
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geonode/proxy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def proxy(request, url=None, response_callback=None,
headers=headers,
timeout=timeout,
user=request.user)
content = response.content
content = response.content or response.reason
status = response.status_code
content_type = response.headers.get('Content-Type')

Expand Down Expand Up @@ -244,6 +244,7 @@ def proxy(request, url=None, response_callback=None,
else:
return HttpResponse(
content=content,
reason=response.reason,
status=status,
content_type=content_type)

Expand Down

0 comments on commit 9de3504

Please sign in to comment.