diff options
author | Paul Barker <pbarker@konsulko.com> | 2020-04-16 09:49:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-26 13:41:29 +0100 |
commit | d03a6d33de90dd02ae686a2a09e406085252456e (patch) | |
tree | abe9fc124c583cdcdbb688faea4bd7fcd9c44307 /scripts/sstate-sysroot-cruft.sh | |
parent | 14c7608311ffeda5c652694a4d5b4086b4c2e059 (diff) | |
download | poky-d03a6d33de90dd02ae686a2a09e406085252456e.tar.gz |
bitbake: fetch2/wget: Set User-Agent when checking status of a URL
When a website is behind a CDN like Cloudflare there may be a "Browser
Integrity Check" or other test applied to requests before they are
allowed through to the server. Downloading via wget passes these tests
as headers are set appropriately, however the Python urllib module may
fail these tests unless additional headers are set. This causes
Wget.checkstatus() to fail where Wget.download() would actually succeed.
For Cloudflare in particular a valid User-Agent is needed, it's easy to
add this to the headers in Wget.checkstatus(). The user agent string is
copied from Wget._fetch_index().
(Bitbake rev: 4679d3cdb9cdf23f3962aa61c599ad7474591f9f)
Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/sstate-sysroot-cruft.sh')
0 files changed, 0 insertions, 0 deletions