Repository navigation
Conversation
The HTTP parser invokes on_path once per read that carries part of the path, but the built-in server normalized the first piece and rejected any further call, so a path longer than one 16 KiB read, or one that arrived in several TCP segments, failed as a malformed request. Collect the raw path and normalize it once the message is complete, which also resolves percent escapes and dot segments split across reads. A second request in the same read is now rejected in on_message_begin, since its path, URI, and query string would otherwise be appended to the first.
devnexen
approved these changes
Nov 7, 2026
LamentXU123
approved these changes
Nov 8, 2026
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.
When a request path reaches
php -Sacross more than one read (a path over the 16 KiB read buffer, or one sent in several segments), the server drops the request as malformed. d7db570 made the URI and query string callbacks concatenate but lefton_pathrejecting a second call; this collects the raw path and normalizes it once the message is complete. A second request pipelined into the same read is rejected inon_message_begin, so its path cannot be appended to the first.