Skip to contentSkip to conversation

[1.46][PATCH] WGET: update user-agent

MASTER cpriouzeau 2 participants 2 messages Jan 20, 2021

lore
Share & tools
lore

cpriouzeau

author
#0 lore raw

With the usage of enterprise proxy, the user-agent defined are too old and refused by proxy configuration.

---
 lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/wget.py +1 -1
index e6d9f528..98c6635d 100644
@@ -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
#1 lore raw

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:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mut&id=16b98ea3e0d01f1c71073d135301c6db315b0ac8

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.

---
 lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/wget.py +1 -2
index e6d9f528..98c6635d 100644
@@ -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