Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

PR HDX-6019 add UA to dataproxy calls #5

Merged
merged 3 commits into from
Aug 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dataproxy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def from_hdx(url):
def create_stream(flow, url):
hdx = from_hdx(url)
if hdx:
request = urllib2.Request(url, headers={"Cookie" : flow.environ['HTTP_COOKIE']})
request = urllib2.Request(url, headers={"Cookie" : flow.environ['HTTP_COOKIE'], 'User-Agent': os.getenv('HDX_USER_AGENT','HDXINTERNAL_DATAPROXY')})
try:
stream = urllib2.urlopen(request)
except urllib2.HTTPError, err:
Expand Down