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

Fixes #37504 - send 404 to v2 client requesting v1/search #11006

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

ianballou
Copy link
Member

What are the changes introduced in this pull request?

Podman no longer has libpod in the HTTP_USER_AGENT header. Now, we should check for v2 clients instead. This should apply to docker as well.

Considerations taken when implementing this change?

/_catalog and /v1/search are both removed from the OCI spec, but we should keep supporting them for now since the clients allow it.

What are the testing steps for this pull request?

  1. Test podman search with unauthenticated pull off (default) and some search text:
$ podman search `hostname`/ubuntu

NAME                                                                                                                     DESCRIPTION
centos9-katello-devel.manicotto.example.com/default_organization-buttermilk_biscuits-docker_ubuntu                       
centos9-katello-devel.manicotto.example.com/default_organization-library-export_view-buttermilk_biscuits-docker_ubuntu   
centos9-katello-devel.manicotto.example.com/default_organization-buttermilk_biscuits-ubuntu                              
centos9-katello-devel.manicotto.example.com/default_organization-library-container_push_view-buttermilk_biscuits-ubuntu 
  1. Try the code as well with a Docker client, just to be safe. Installed Docker-CE via their online instructions.

@sjha4
Copy link
Member

sjha4 commented Jun 13, 2024

Before PR: 200 status code
200_Before_PR

After PR: 404 returned.
404_after_PR

Code makes sense after reading description. Ack 👍🏼

@ianballou ianballou merged commit 276adf2 into Katello:master Jun 18, 2024
23 checks passed
@ianballou ianballou deleted the 37504-fix-podman-search branch June 18, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants