summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Salmon <will.salmon@codethink.co.uk>2020-05-05 17:06:06 +0100
committerWilliam Salmon <will.salmon@codethink.co.uk>2020-05-05 17:29:01 +0100
commit8cb72a2e6dd1277706e1aff95aade4595abefb8c (patch)
treee6d5bf51d89ffcb55325fec4bbb800ccbb0cd936
parenta0d92fd8758d737885bf55bbe3b7c48139467707 (diff)
downloadbuildstream-willsalmon/backport1897.tar.gz
_downloadablefilesource.py: Set user agentwillsalmon/backport1897
Backporting https://gitlab.com/BuildStream/buildstream/-/merge_requests/1897
-rw-r--r--buildstream/plugins/sources/_downloadablefilesource.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/buildstream/plugins/sources/_downloadablefilesource.py b/buildstream/plugins/sources/_downloadablefilesource.py
index ab8140de0..de1267212 100644
--- a/buildstream/plugins/sources/_downloadablefilesource.py
+++ b/buildstream/plugins/sources/_downloadablefilesource.py
@@ -107,6 +107,7 @@ class DownloadableFileSource(Source):
default_name = os.path.basename(self.url)
request = urllib.request.Request(self.url)
request.add_header('Accept', '*/*')
+ request.add_header('User-Agent', 'BuildStream/1')
# We do not use etag in case what we have in cache is
# not matching ref in order to be able to recover from