Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
yum
yum-3.4.3-preserve-queryparams-in-urls.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File yum-3.4.3-preserve-queryparams-in-urls.patch of Package yum
>From 964f75c66170d7d5aa860f2dd37d5a079f900bde Mon Sep 17 00:00:00 2001 From: Michael Calmer <mc@suse.de> Date: Fri, 12 Sep 2014 13:05:04 +0200 Subject: [PATCH] preserve queryparams in urls Some CDN do token authentication by appending a token to the URL as query parameter. So the baseurl could be something like: https://host.domain.top/path/?abcdef1234567890 Simply appending the relative part to it will result in an invalid URL. --- yum/yumRepo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: yum-3.4.3/yum/yumRepo.py =================================================================== --- yum-3.4.3.orig/yum/yumRepo.py +++ yum-3.4.3/yum/yumRepo.py @@ -677,11 +677,11 @@ class YumRepository(Repository, config.R if url in ['', None]: continue url = parser.varReplace(url, self.yumvar) - if url[-1] != '/': - url= url + '/' try: # This started throwing ValueErrors, BZ 666826 (s,b,p,q,f,o) = urlparse.urlparse(url) + if p[-1] != '/': + p = p + '/' except (ValueError, IndexError, KeyError), e: s = 'blah' @@ -689,7 +689,7 @@ class YumRepository(Repository, config.R skipped = url continue else: - goodurls.append(url) + goodurls.append(urlparse.urlunparse((s,b,p,q,f,o))) if skipped is not None: # Caller cleans up for us. @@ -807,7 +807,7 @@ class YumRepository(Repository, config.R size=size, **ugopts) - remote = url + '/' + relative + remote = urlparse.urlunsplit((scheme, netloc, path + '/' + relative, query, fragid)) try: result = ug.urlgrab(misc.to_utf8(remote), local,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor