diff options
author | William Salmon <will.salmon@codethink.co.uk> | 2020-05-05 16:09:17 +0000 |
---|---|---|
committer | William Salmon <will.salmon@codethink.co.uk> | 2020-05-05 16:09:17 +0000 |
commit | 9b42678148cdc32233ff06f06bde71d0d915021a (patch) | |
tree | b43e564d1773306ed8f1e07a5f839056209e3d21 | |
parent | 023e63b1623783e6e8f8bd7e09119d75606ffd93 (diff) | |
parent | 81e5ce707a919f2e0b4f8be5d8b1a44f2a5e355b (diff) | |
download | buildstream-9b42678148cdc32233ff06f06bde71d0d915021a.tar.gz |
Merge branch 'willsalmon/useragnet' into 'master'
_downloadablefilesource.py: Set user agent
Closes #1285
See merge request BuildStream/buildstream!1897
-rw-r--r-- | src/buildstream/plugins/sources/_downloadablefilesource.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buildstream/plugins/sources/_downloadablefilesource.py b/src/buildstream/plugins/sources/_downloadablefilesource.py index ad8fe9f22..fcdd005ac 100644 --- a/src/buildstream/plugins/sources/_downloadablefilesource.py +++ b/src/buildstream/plugins/sources/_downloadablefilesource.py @@ -163,6 +163,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/2") # We do not use etag in case what we have in cache is # not matching ref in order to be able to recover from |