Repository navigation
gh-159044: Restore string conversion for HTTP tunnel headers - #159167
Closed
SomSamantray wants to merge 1 commit into
Closed
SomSamantray wants to merge 1 commit into
SomSamantray wants to merge 1 commit into
Conversation
Documentation build overview
|
Member
|
It is extremely rude to submit a PR after someone else has already done all the discussion, research, and asked to author the fix, especially if that someone is a first-time contributor. I'm closing this to give @bielpieroli a chance to work on a patch first. |
|
Thank you, @ZeroIntensity, I really appreciate it. Sorry for the late reply. To be honest, when I woke up and saw a PR was already open I felt a bit discouraged, so I stayed away and only saw the notifications now. I'll start working on the patch right now with my partner @LorenaMBorges :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTTPSConnection.set_tunnel()regressed when it began calling.encode()directly on header names and values. Previously, formatting converted these values to strings, so values such asNoneand integers were accepted. Convert both names and values to strings before Latin-1 encoding, preserving that behavior and the existing CR/LF validation.Fixes #159044
Tests
./python -m test test_httplib -m test_tunnel_headers_are_converted_to_strings— passed../python -m test test_httplib— passed (153 tests, 5 skipped)../python Tools/patchcheck/patchcheck.py— passed../python -m testrun: 449 test files passed, 96 skipped; failures were intest_osandtest_pathlibmount/device assertions,test_socketVSOCK without a device,test_profiling(passed when rerun alone), and a shared-environment change reported bytest_httpservers(passed alone).AI tools assisted with investigation, implementation, and review. I reviewed the resulting changes.
http.client.HTTPSConnection._tunnelraisesAttributeError: 'NoneType' object has no attribute 'encode'when header value isNone#159044