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
Server Name Identification (RFC 6066 Section 3) which disallows IP addresses (see the RFC search for "Literal IPv4"). It's set via server_hostname in Trio for example.
Also I found this issue cuz I fixed it for urllib3. :)
How sure are you that this issue actually exists in httpx?
Unless I'm mistaken connections are established using asyncio.open_connection which AFAICT does the Right Thing.
I had a look with wireshark, and I only see the server_name extension in the ClientHello if I query a host name. If I connect to an IP address, the server_name extension is absent.
@sethmlarson I get the same behavior than @jlaine for the TrioBackend (#276): server_name is absent from the ClientHello if connecting to an IP address:
We do send SNI when querying an FQDN, and don't when querying an IP (at least for asyncio). If you don't force asyncio's hand by setting server_hostname it does the right thing on its own.
Activity
florimondmanca commentedon Aug 26, 2019
Just wondering — what is SNI? 😄 Also, is there any more context on how this bug was discovered?
sethmlarson commentedon Aug 26, 2019
Server Name Identification (RFC 6066 Section 3) which disallows IP addresses (see the RFC search for "Literal IPv4"). It's set via
server_hostnamein Trio for example.Also I found this issue cuz I fixed it for urllib3. :)
jlaine commentedon Aug 26, 2019
How sure are you that this issue actually exists in httpx?
Unless I'm mistaken connections are established using
asyncio.open_connectionwhich AFAICT does the Right Thing.I had a look with wireshark, and I only see the
server_nameextension in theClientHelloif I query a host name. If I connect to an IP address, theserver_nameextension is absent.florimondmanca commentedon Aug 27, 2019
@sethmlarson I get the same behavior than @jlaine for the
TrioBackend(#276):server_nameis absent from theClientHelloif connecting to an IP address:sethmlarson commentedon Aug 27, 2019
Nice, then we can probably close this issue.
jlaine commentedon Aug 28, 2019
This would definitely need to be re-visited if we ever start using
server_hostnamefor asyncio or trio.sethmlarson commentedon Aug 28, 2019
So do we not send SNI for any handshakes? Because that's an issue in itself.
jlaine commentedon Aug 28, 2019
We do send SNI when querying an FQDN, and don't when querying an IP (at least for asyncio). If you don't force asyncio's hand by setting
server_hostnameit does the right thing on its own.