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
Okay, so I don't think we want a MissingHostname exception class.
Instead what we actually want for handling that case is to expand our ProtocolError, so...
ProtocolError
RemoteProtocolError
LocalProtocolError
Everywhere we're currently raising it is a RemoteProtocolError, but we do actually want a small handful of LocalProtocolError cases, including...
Missing hostname in URL.
No Host header included. (Eg. that might expose in httpx if you create a invalid Request manually and .send() it.)
Activity
lovelydinosaur commentedon Jul 31, 2020
Thought: We also need to handle the no-host-in-URL case.
Currently dealt with here: https://github.com/encode/httpx/blob/9409900898f40ed855e9c7a7664b7e068599a07d/httpx/_utils.py#L268-L282
I guess we need both
MissingHostname(...)andUnsupportedProtocol(...), then.We can drop httpx's
InvalidURLafter this, and instead mirror these two transport errors.lovelydinosaur commentedon Aug 2, 2020
Okay, so I don't think we want a
MissingHostnameexception class.Instead what we actually want for handling that case is to expand our
ProtocolError, so...ProtocolErrorRemoteProtocolErrorLocalProtocolErrorEverywhere we're currently raising it is a
RemoteProtocolError, but we do actually want a small handful ofLocalProtocolErrorcases, including...Hostheader included. (Eg. that might expose inhttpxif you create a invalidRequestmanually and.send()it.)Any similar cases.