You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No "host" field in HTTP header in https proxy session #1981
However, in botocore, the https connection with "CONNECT" use HTTP/1.0
This problem is caused by Python's standard library
(the pull and request are already sent to github: python/cpython#8305)
In addion to that, there is no "Host" field in https session in Botocore in spite of the description in RFC7230 that "Host" field is required in HTTP/1.1.
A client MUST send a Host header field in all HTTP/1.1 request messages.
My apologies for the lack of response on this. Thanks for bringing it to our attention! This was reported to us in #2846 (boto3) as well— I think this is a more appropriate place to track it, given the shared functionality between the CLI and Boto3.
There were some concerns about about race conditions in multi-threaded environments where the wrong host header may be sent, with regard to the current methods available to resolve this using urllib3, but I'll see if I can get the team's thoughts on your PR.
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.
Activity
[-]No "host" field in HTTP header in https session[/-][+]No "host" field in HTTP header in https proxy session[/+]0weight commentedon Apr 13, 2020
Hi @swetashre .
I've actually tried it with the AWS CLI, so you can see it.
This screenshot is the result of a packet capture of the

aws s3 lscommand.And this screenshot is another CONNECT METHOD packet capture.

The host field must be included like this.
Some proxy servers use a "host field" for proxy-to-proxy forwarding on multiple proxies, which causes proxy-to-proxy forwarding to fail.
Therefore, AWS CLI is not available in this environment.
stobrien89 commentedon May 18, 2021
Hi @siradori,
My apologies for the lack of response on this. Thanks for bringing it to our attention! This was reported to us in #2846 (boto3) as well— I think this is a more appropriate place to track it, given the shared functionality between the CLI and Boto3.
There were some concerns about about race conditions in multi-threaded environments where the wrong host header may be sent, with regard to the current methods available to resolve this using urllib3, but I'll see if I can get the team's thoughts on your PR.
github-actions commentedon May 18, 2022
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.