No user-agent set when communicating via proxy #1457
Labels
bug
This issue is a bug.
hacktoberfest
We encourage contributions to this issue for Hacktoberfest.
p3
This is a minor priority issue
proxy
This issue is related to a proxy configuration
Expected Behavior
When communicating via an explicit (non-transparent) HTTP Proxy, the User-Agent header should be set to something like
aws-sdk-java/whatever...
(seeUserAgentUtils.UA_STRING
for the template)Current Behavior
The User-Agent header is set to an empty string:
I believe this is due to the
.setUserAgent("")
inApacheHttpClient.createClient()
.Possible Solution
It would be nice for the User-Agent header to be set to something sensible in the client itself instead of the empty string (as outlined above). Later on in the (normal) request processing, the AWS SDK will set the User-Agent header itself, but that's only for the portion of the request that it actually handles (i.e. the SDK explicitly sets the header when making a request, whereas the
setUserAgent()
sets a property on the client itself, and that property is needed by HttpClient when talking to a proxy).Steps to Reproduce (for bugs)
proxyConfiguration()
on theApacheHttpClient
's builder)Context
Proxy servers may handle requests different depending on a number of factors, including the User Agent. Without an accurate User Agent header, proxy servers lose an important piece of information.
Your Environment
The text was updated successfully, but these errors were encountered: