forked from benoitc/gunicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview: bugfix release v22.1.0 #2
Closed
Closed
Conversation
This file contains 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
The main purpose is to remove complexity from gthread by: * Removing the lock for handling self._keep and self.poller. This is possible since we now do all such manipulation on the main thread instead. When a connection is done, it posts a callback through the PollableMethodCaller which gets executed on the main thread. * Having a single event queue (self.poller), as opposed to also managing a set of futures. This fixes benoitc#3146 (although there are more minimal ways of doing it). There are other more minor things as well: * Renaming some variables, e.g. self._keep to self.keepalived_conns. * Remove self-explanatory comments (what the code does, not why). * Just decide that socket is blocking. * Use time.monotonic() for timeouts in gthread. Some complexity has been added to the shutdown sequence, but hopefully for good reason: it's to make sure that all already accepted connections are served within the grace period.
New parser rule: refuse HTTP requests where a header field value contains characters that a) should never appear there in the first place, b) might have lead to incorrect treatment in a proxy in front, and c) might lead to unintended behaviour in applications. From RFC 9110 section 5.5: "Field values containing CR, LF, or NUL characters are invalid and dangerous, due to the varying ways that implementations might parse and interpret those characters; a recipient of CR, LF, or NUL within a field value MUST either reject the message or replace each of those characters with SP before further processing or forwarding of that message."
Strip whitespace also *after* header field value. Intoduce a default-off option to simply refuse obsolete header folding. While we are at it, explicitly handle recently introduced http error classes with intended status code.
A single slash is valid, but nothing at all can be safely refused. Python stdlib explicitly tells us it will not perform validation. https://docs.python.org/3/library/urllib.parse.html#url-parsing-security There are *four* `request-target` forms in rfc9112, none of them can be empty.
just to ease static code analysis, no functional change intended
alternate spelling _build covers new defaults of regenerated sphinx Makefile
Pylint 3.0 is the first version to officially support Python 12
Debian buster EoL since 2022-09-10
Treat it the same as invalid characters where size should be.
…'benoitc/pr/3157', 'benoitc/pr/3192', 'benoitc/pr/3210', 'benoitc/pr/3253', 'benoitc/pr/3254', 'benoitc/pr/3255', 'benoitc/pr/3257' and 'benoitc/pr/3258' into integration-v22.1.0
pajod
force-pushed
the
integration-v22.1.0
branch
from
July 31, 2024 17:23
d5f6c9e
to
2443d33
Compare
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.
The following PRs merge fine. I recommend these go into a 22.1.0 bugfix release.
OUTSTANDING PROBLEM: 3210 need rebase, it was meant to be used on top of 3127 initially, right now git merges it fine but the code is inappropriate.
Please do not actually octopus merge though, sequential merges produce clearer output in common git tools. Created using this script: