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.
iliaal
force-pushed
the
fix/aph-cli-split-path-84
branch
from
November 7, 2026 16:57
efa8d02 to
d5f0b8f
Compare
Owner
Author
|
Promoted upstream as php#25291. |
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.
The CLI server rejects a request when its path arrives in multiple reads. The server now accumulates the raw path and normalizes it once before translation, preserving percent escapes and dot segments across fragments. Query strings and request URIs already concatenate fragments. A second message is rejected at message start to preserve the previous handling of pipelined requests.
Found during source review and reproduced with PHP 8.4's built-in server on Linux. The oversized-path test still checks rejection beyond the parser's 80 KiB header limit.