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

Commit

Permalink
Merge pull request #5 from OCHA-DAP/feature/HDX-6019-send-ua
Browse files Browse the repository at this point in the history
PR HDX-6019 add UA to dataproxy calls
  • Loading branch information
danmihaila committed Aug 27, 2018
2 parents 638d89a + dcaabe5 commit f817741
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit f817741

Please sign in to comment.