Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_trailing_slash needs to be added to _match_distribution() calls #1399

Closed
dkliban opened this issue Sep 22, 2023 · 0 comments · Fixed by #1407
Closed

add_trailing_slash needs to be added to _match_distribution() calls #1399

dkliban opened this issue Sep 22, 2023 · 0 comments · Fixed by #1407
Assignees
Labels

Comments

@dkliban
Copy link
Member

dkliban commented Sep 22, 2023

With pulpcore 3.40.0 the following patch needs to be added

diff --git a/pulp_container/app/registry.py b/pulp_container/app/registry.py
index 706ae899..30e37b81 100644
--- a/pulp_container/app/registry.py
+++ b/pulp_container/app/registry.py
@@ -105,7 +105,7 @@ class Registry(Handler):
 
         path = request.match_info["path"]
         tag_name = request.match_info["tag_name"]
-        distribution = await sync_to_async(self._match_distribution)(path)
+        distribution = await sync_to_async(self._match_distribution)(path, add_trailing_slash=False)
         await sync_to_async(self._permit)(request, distribution)
         repository_version = await sync_to_async(distribution.get_repository_version)()
         if not repository_version:
@@ -222,7 +222,7 @@ class Registry(Handler):
 
         path = request.match_info["path"]
         digest = "sha256:{digest}".format(digest=request.match_info["digest"])
-        distribution = await sync_to_async(self._match_distribution)(path)
+        distribution = await sync_to_async(self._match_distribution)(path, add_trailing_slash=False)
         await sync_to_async(self._permit)(request, distribution)
         repository_version = await sync_to_async(distribution.get_repository_version)()
         if not repository_version:
@lubosmj lubosmj moved this from Todo to Not Started in Pulp Container Roadmap Oct 30, 2023
dkliban added a commit to dkliban/pulp_container that referenced this issue Nov 1, 2023
@lubosmj lubosmj moved this from Not Started to In Progress in Pulp Container Roadmap Nov 1, 2023
@pulpbot pulpbot moved this to In Progress in RH Pulp Kanban board Nov 1, 2023
dkliban added a commit to dkliban/pulp_container that referenced this issue Nov 1, 2023
dkliban added a commit to dkliban/pulp_container that referenced this issue Nov 2, 2023
dkliban added a commit to dkliban/pulp_container that referenced this issue Nov 2, 2023
dkliban added a commit that referenced this issue Nov 2, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Pulp Container Roadmap Nov 2, 2023
@pulpbot pulpbot moved this from In Progress to Done in RH Pulp Kanban board Nov 2, 2023
@lubosmj lubosmj moved this from Done to Shipped in Pulp Container Roadmap Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Shipped
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants