Fix HTTPConnection.communicate() to pass server proxy and strict mode settings#831
Open
andrewkernel wants to merge 1 commit into
Open
Fix HTTPConnection.communicate() to pass server proxy and strict mode settings#831andrewkernel wants to merge 1 commit into
andrewkernel wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #831 +/- ##
===========================================
- Coverage 78.19% 54.74% -23.46%
===========================================
Files 41 12 -29
Lines 4788 411 -4377
Branches 547 1 -546
===========================================
- Hits 3744 225 -3519
+ Misses 905 186 -719
+ Partials 139 0 -139 |
Member
|
This PR addresses an inconsistency in |
a433c69 to
d258498
Compare
Pass the server proxy and strict mode settings into HTTP request parsing from HTTPConnection.communicate. This preserves the configured request handling flags for accepted connections and covers the constructor arguments with a focused regression test.
Member
|
I updated the title of this PR as your original one no longer applied. You need to update your commit message similarly and also ensure the body is line-wrapped at ~72 characters - there is a linter error about this currently. |
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.
❓ What kind of change does this PR introduce?
📋 What is the related issue number (starting with
#)Resolves #823.
❓ What is the current behavior? (You can also link to an open issue here)
HTTPConnection.communicate()initialized request handlers with defaultproxy_modeandstrict_modevalues instead of the server's configured values.❓ What is the new behavior (if this is a feature change)?
HTTPConnection.communicate()now passesproxy_mode=self.server.proxy_modeandstrict_mode=self.server.strict_modewhen constructing the request handler.📋 Other information:
Added
docs/changelog-fragments.d/831.bugfix.rst.Testing:
.venv\Scripts\python.exe -m pytest --no-cov -n 0 cheroot/test/test_server.py -k communicate_uses_server_proxy_and_strict_mode📋 Contribution checklist: