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
The bug is reproducible against the latest release and/or master.
There are no similar issues or pull requests to fix it yet.
Describe the bug
Using the AsyncClient with an ASGI app seems to go through the proxy. Either this is is bug or I don't understand under which conditions this would make sense.
Might be worth looking if there’s any past discussion about whether we should make trust_env default to False... I think we’ve had strange UX like these in the past due to HTTPX using env cars when it didn’t really make sense.
Alternatively, on a smaller scope, we can look at the auto proxies setup code, see if it makes sense to bypass it if an app was passed... (Noting that it’s fixes the behavior in this particular case only, eg custom dispatchers where mount-by-scheme doesn’t really make sense could also experience this bug in the future. But you know, YAGNI...)
Activity
florimondmanca commentedon Jun 30, 2020
Might be worth looking if there’s any past discussion about whether we should make
trust_envdefault toFalse... I think we’ve had strange UX like these in the past due to HTTPX using env cars when it didn’t really make sense.Alternatively, on a smaller scope, we can look at the auto proxies setup code, see if it makes sense to bypass it if an
appwas passed... (Noting that it’s fixes the behavior in this particular case only, eg custom dispatchers where mount-by-scheme doesn’t really make sense could also experience this bug in the future. But you know, YAGNI...)lovelydinosaur commentedon Jul 1, 2020
Yup absolutely makes sense to ignore the proxies setup if
app=...is passed. 👍florimondmanca commentedon Jul 2, 2020
Cool, looks like the resolution path is all rounded there, up for grabs…