mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
bitbake: fetch2/wget: Keep query parameters in URL during checkstatus
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> (Bitbake rev: 8dcf084522b9c66a6639b5f117f554fde9b6b45a) Signed-off-by: Philippe-Alexandre Mathieu <pamathieu@poum.ca> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
parent
324f29337b
commit
255271dfff
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user