From 8cb72a2e6dd1277706e1aff95aade4595abefb8c Mon Sep 17 00:00:00 2001 From: William Salmon Date: Tue, 5 May 2020 17:06:06 +0100 Subject: _downloadablefilesource.py: Set user agent Backporting https://gitlab.com/BuildStream/buildstream/-/merge_requests/1897 --- buildstream/plugins/sources/_downloadablefilesource.py | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.1