[1.46][PATCH] WGET: update user-agent
With the usage of enterprise proxy, the user-agent defined are too old and refused by proxy configuration.
Signed-off-by Christophe Priouzeau <[email protected]>
--- lib/bb/fetch2/wget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/wget.py +1 -1
@@ -297,7 +297,7 @@ class Wget(FetchMethod): # Some servers (FusionForge, as used on Alioth) require that the # optional Accept header is set. r.add_header("Accept", "*/*") - r.add_header("User-Agent", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12") + r.add_header("User-Agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0") def add_basic_auth(login_str, request): '''Adds Basic auth to http request, pass in login:password as string''' import base64
Signature · 1 line
2.17.1
There are two instances of the User-Agent in that code. A quick patch I came up with during the call yesterday is as follows:
If you can come up with a patch that incorporates the fixes in mine, feel free to post it with your authorship as there's no way I can test it.
Ross
Quoted 27 lines · cpriouzeau via lists.openembedded.org
With the usage of enterprise proxy, the user-agent defined are too old and refused by proxy configuration.
Signed-off-by Christophe Priouzeau <[email protected]>--- lib/bb/fetch2/wget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/bb/fetch2/wget.py +1
-2@@ -297,7 +297,7 @@ class Wget(FetchMethod): # Some servers (FusionForge, as used on Alioth) require that the # optional Accept header is set. r.add_header("Accept", "*/*") - r.add_header("User-Agent", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12") + r.add_header("User-Agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0") def add_basic_auth(login_str, request): '''Adds Basic auth to http request, pass in login:password as string''' import base64 --2.17.1