Skip TLS-in-TLS warning when proxy is not HTTPS#12238
Skip TLS-in-TLS warning when proxy is not HTTPS#12238Dreamsorcerer merged 1 commit intoaio-libs:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12238 +/- ##
=======================================
Coverage 99.10% 99.11%
=======================================
Files 130 130
Lines 45402 45404 +2
Branches 2399 2400 +1
=======================================
+ Hits 44997 45000 +3
Misses 273 273
+ Partials 132 131 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
b495be5 to
0c0dbbd
Compare
|
@wavebyrd Not sure what you just force pushed, but going to need that reverted to have any chance of reviewing this. |
The warning in _warn_about_tls_in_tls was firing for all HTTPS requests going through any proxy, but TLS-in-TLS only applies when the proxy itself is HTTPS. When the proxy is HTTP, start_tls just upgrades a plain TCP connection, which works fine on all event loops and Python versions. Fixes aio-libs#10683
0c0dbbd to
9d16210
Compare
|
Fixed - rebased cleanly on master. Now shows just the single commit with the fix. Sorry for the confusion! |
|
Ping - this skips the TLS-in-TLS warning when the proxy isn't HTTPS. Ready for review! |
Backport to 3.14: 💚 backport PR created✅ Backport PR branch: Backported as #12248 🤖 @patchback |
(cherry picked from commit 24cb8c9)
…y is not HTTPS (#12248) **This is a backport of PR #12238 as merged into master (24cb8c9).** Co-authored-by: wavebyrd <[email protected]>
Summary
_warn_about_tls_in_tlswarning was firing for all HTTPS requests through any proxy, but TLS-in-TLS only applies when the proxy itself uses HTTPS.start_tlsupgrades a plain TCP connection, which is not TLS-in-TLS and works fine everywhere.req.proxy.schemeso the warning is only emitted when the proxy is actually HTTPS.Fixes #10683
Test plan
test_https_proxy_unsupported_tls_in_tlscovers the HTTPS-proxy case and should still pass (warning still fires for HTTPS proxies on old Python).