-
-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting alternate schemes. #954
Comments
I think we should scope this issue a bit.
If that's the case then we can change how port is derived from the scheme in the Or,
Supporting arbitrary schemes introduces quite a few questions:
|
To rephrase this slightly, it's not exactly about "supporting alternate schemes" so much as "Enforcing http/https and determining default port mappings should be the responsibility of the transport layer." Changes would be:
|
Didn't realize initially that there was already an initial PR about this in HTTPCore - encode/httpcore#92 |
Okay so #967 and |
Closing this issue in favour of #1059 |
Custom transport classes might want to support alternate schemes in addition to "http" and "https".
Issue #931 includes a couple of examples here...
test:
scheme in unit tests for session handling.http+thing:
custom schemes that enable additional behaviours at the transport level.The question is how would we best want to support this. One thing that might be sensible here is to change the Transport API slightly, so that the
url
signature isTuple[bytes, bytes, Optional[int], bytes]
instead of the currentTuple[bytes, bytes, int, bytes]
.We would then pass only any explicitly included port in the URL, and leave any protocol->port mapping to the responsibility of the transport class. The
AsyncConnectionPool
andSyncConnectionPool
classes would enforcescheme=[b'http'|b'https']
, but alternate transport classes could provide other behaviour.A first step here would to to review where in the
httpx
codebase we're currently accessing theURL
port.The text was updated successfully, but these errors were encountered: