diff --git a/CHANGES/842.bugfix b/CHANGES/842.bugfix new file mode 100644 index 00000000..8c5848df --- /dev/null +++ b/CHANGES/842.bugfix @@ -0,0 +1 @@ +Fixed pull-through caching not working for indexes that use relative URLs. diff --git a/pulp_python/app/pypi/views.py b/pulp_python/app/pypi/views.py index 39a02094..0174c937 100644 --- a/pulp_python/app/pypi/views.py +++ b/pulp_python/app/pypi/views.py @@ -260,9 +260,9 @@ def parse_package(release_package): return HttpResponse(f"{remote.url} timed out while fetching {package}.", status=504) if d.headers["content-type"] == "application/vnd.pypi.simple.v1+json": - page = ProjectPage.from_json_data(json.load(open(d.path, "rb")), base_url=remote.url) + page = ProjectPage.from_json_data(json.load(open(d.path, "rb")), base_url=url) else: - page = ProjectPage.from_html(package, open(d.path, "rb").read(), base_url=remote.url) + page = ProjectPage.from_html(package, open(d.path, "rb").read(), base_url=url) packages = [ parse_package(p) for p in page.packages if rfilter.filter_release(package, p.version) ]