diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 493a5b62ee..7856d10fa4 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
| @@ -53,11 +53,6 @@ class WgetProgressHandler(bb.progress.LineFilterProgressHandler): | |||
| 53 | class Wget(FetchMethod): | 53 | class Wget(FetchMethod): |
| 54 | """Class to fetch urls via 'wget'""" | 54 | """Class to fetch urls via 'wget'""" |
| 55 | 55 | ||
| 56 | # CDNs like CloudFlare may do a 'browser integrity test' which can fail | ||
| 57 | # with the standard wget/urllib User-Agent, so pretend to be a modern | ||
| 58 | # browser. | ||
| 59 | user_agent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0" | ||
| 60 | |||
| 61 | def check_certs(self, d): | 56 | def check_certs(self, d): |
| 62 | """ | 57 | """ |
| 63 | Should certificates be checked? | 58 | Should certificates be checked? |
| @@ -356,7 +351,7 @@ class Wget(FetchMethod): | |||
| 356 | # Some servers (FusionForge, as used on Alioth) require that the | 351 | # Some servers (FusionForge, as used on Alioth) require that the |
| 357 | # optional Accept header is set. | 352 | # optional Accept header is set. |
| 358 | r.add_header("Accept", "*/*") | 353 | r.add_header("Accept", "*/*") |
| 359 | r.add_header("User-Agent", self.user_agent) | 354 | r.add_header("User-Agent", "bitbake/{}".format(bb.__version__)) |
| 360 | def add_basic_auth(login_str, request): | 355 | def add_basic_auth(login_str, request): |
| 361 | '''Adds Basic auth to http request, pass in login:password as string''' | 356 | '''Adds Basic auth to http request, pass in login:password as string''' |
| 362 | import base64 | 357 | import base64 |
