All of lore.kernel.org
 help / color / mirror / Atom feed
* [scarthgap][PATCH] fetch2/wget: Keep query parameters in URL during checkstatus
@ 2025-07-30 17:44 Philippe-Alexandre Mathieu
  2025-10-30 17:59 ` David Khouya
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe-Alexandre Mathieu @ 2025-07-30 17:44 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Philippe-Alexandre Mathieu, Steve Sakoman

When recreating the uri in wget's checkstatus method, we only use the
scheme, host and path. This completely strips the query parameters from
the final URI and potentially breaks the checking functionality for
URLs that require query parameters (such as the AZ fetcher with SAS
token).

This bug was resolved on master in
`096301250455e2a83bdd818a56317c62436c9981`.
This patch is adapted to the scarthgap branch.

CC: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Philippe-Alexandre Mathieu <pamathieu@poum.ca>
---
 bitbake/lib/bb/fetch2/wget.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 5bb3b2f361..2345ba6b49 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -344,8 +344,11 @@ class Wget(FetchMethod):
             opener = urllib.request.build_opener(*handlers)
 
             try:
-                uri_base = ud.url.split(";")[0]
-                uri = "{}://{}{}".format(urllib.parse.urlparse(uri_base).scheme, ud.host, ud.path)
+                parts = urllib.parse.urlparse(ud.url.split(";")[0])
+                if parts.query:
+                    uri = "{}://{}{}?{}".format(parts.scheme, parts.netloc, parts.path, parts.query)
+                else:
+                    uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path)
                 r = urllib.request.Request(uri)
                 r.get_method = lambda: "HEAD"
                 # Some servers (FusionForge, as used on Alioth) require that the
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [scarthgap][PATCH] fetch2/wget: Keep query parameters in URL during checkstatus
  2025-07-30 17:44 [scarthgap][PATCH] fetch2/wget: Keep query parameters in URL during checkstatus Philippe-Alexandre Mathieu
@ 2025-10-30 17:59 ` David Khouya
  0 siblings, 0 replies; 2+ messages in thread
From: David Khouya @ 2025-10-30 17:59 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 71 bytes --]

Hi,

Can this patch be merged in the next scarthgap tag?

Thanks,

[-- Attachment #2: Type: text/html, Size: 104 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-30 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 17:44 [scarthgap][PATCH] fetch2/wget: Keep query parameters in URL during checkstatus Philippe-Alexandre Mathieu
2025-10-30 17:59 ` David Khouya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.