Uh oh!
There was an error while loading. Please reload this page.
Support bare hostname in proxy - #1118
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lovelydinosaur
commented
Aug 2, 2020
Fantastic, loving this, thanks! 😃 One interesting question here... Eg. If forschemein ("http", "https", "all"):
ifproxy_info.get(scheme):
mounts[scheme] =proxy_info[scheme]to instead be this... forschemein ("http", "https", "all"):
ifproxy_info.get(scheme):
hostname=proxy_info[scheme]
mounts[scheme] =hostnameif"://"inhostnameelsef"http://{hostname}"Then we wouldn't change the code in client=httpx.Client(proxies="http://localhost:1234") # Okayclient=httpx.Client(proxies="localhost:1234") # Invalid, raises an errorWhile still handling the fuzzy Thoughts? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Great stuff! Agreed with ^. :-) Also, if we go the "env vars only" path, we can probably update the Environment Variables: HTTP_PROXY, HTTPS_PROXY, ALL_PROXY docs as part of this PR? (Could be a follow-up task too, don't mind.) |
lovelydinosaur
commented
Aug 2, 2020
Great catch on the We can treat them separately (Because I'd probably prefer that we |
lovelydinosaur
commented
Aug 2, 2020
@florimondmanca Yes, good call. General note: We're also missing |
florimondmanca
commented
Aug 2, 2020
Yup. I'm working on a revamp of proxy docs anyway so I can include that stuff there as well. |
Closes #1082
httpscheme for bare hostname in proxy.getlist()