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

Set User-Agent string for HTTP requests #3788

Closed
stefanb2 opened this issue Aug 12, 2019 · 0 comments · Fixed by #3793
Closed

Set User-Agent string for HTTP requests #3788

stefanb2 opened this issue Aug 12, 2019 · 0 comments · Fixed by #3793
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@stefanb2
Copy link
Contributor

stefanb2 commented Aug 12, 2019

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

(not sure: you could argue this is a regression...)

Description

podman does not set user agent string on HTTP requests. Therefore the default will be used:

User-Agent: Go-http-client/1.1

Steps to reproduce the issue:

  1. podman pull host/path:tag
  2. check the HTTP server log on the docker registry

Additional information you deem important (e.g. issue happens only occasionally):

I root caused why docker pull repo/path:tag worked with our internal docker repository, but podman pull repo/path:tag didn't. Our setup uses a nginx reverse proxy that only forwards requests to https://repo:443/... if the User-Agent string matches the pattern docker, e.g. docker/1.13. After changing the pattern to (docker|Go-http-client) the problem went away.

But the generic Go-http-client/1.1 isn't really useful for filtering and it is a regression when compared to docker. Some suggestions how to solve this:

  1. Fake it, i.e. pretend to be Docker daemon and use something like docker/1.13 (podman).
  2. Be honest, i.e. use podman/1.4.4. This would allow people to update they filters properly.
  3. one of the above plus a command line option to override it when required?

Output of podman version:

Version:            1.4.4
RemoteAPI Version:  1
Go Version:         go1.12.7
OS/Arch:            linux/amd64
@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 12, 2019
stefanb2 added a commit to stefanb2/libpod that referenced this issue Aug 12, 2019
Set the string to "libpod/VERSION" so that we don't use the unspecific
default of "Go-http-client/xxx".

Fixes containers#3788

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
gabibeyer pushed a commit to gabibeyer/libpod that referenced this issue Aug 15, 2019
Set the string to "libpod/VERSION" so that we don't use the unspecific
default of "Go-http-client/xxx".

Fixes containers#3788

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
gabibeyer pushed a commit to gabibeyer/libpod that referenced this issue Aug 16, 2019
Set the string to "libpod/VERSION" so that we don't use the unspecific
default of "Go-http-client/xxx".

Fixes containers#3788

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants