What were you trying to do that didn't work?
In image builder we use curl to download rpms. Sometimes this happens from within the VPN, and for certain content we use the squid.corp.redhat.com proxy. Certain content actually redirects, and that's where curl breaks, or rather the proxy as not every proxy can deal with the user agent suddenly changing mid connection.
Please provide the package NVR for which bug is seen:
curl-7.76.1-29.el9_4
How reproducible:
The conditions for this to happen are quite specific:
- User agent is set through --header "User-Agent" and not through the --user-agent option
- The endpoint that is being curled is https
- The endpoint redirects and --location is specified
- --proxy is used
Steps to reproduce
curl --location --proxy squid.corp.redhat.com:3128 --header "User-Agent: foobar" https://google.be
and compare with
curl --location --proxy squid.corp.redhat.com:3128 --user-agent "foobar" https://google.be
Expected results
The user agent is foobar throughout.
Actual results
When first connecting via the proxy, the user-agent is "curl/$version", the redirect is done with "foobar", tripping up the proxy.