Repository navigation
fix(h1): end the connection after a failed or short file body (#362) - #363
Merged
Merged
Conversation
…th PHP hooks to enable them (S2.1)
…tion alive (S2.2)
…swer a file request whose deferred start is refused (S2.3)
Contributor
CoverageTotal lines: 83.70% → 83.83% (+0.14 pp)
|
… the warm-up transfer (#362)
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.
Closes #362.
An HTTP/1 file body that failed or came up short left the connection open, so the next response was read as the rest of the body.
on_donecallbacks honour the engine's status; a failed body marks the framing lost, sohttp_request_finalizeneither keeps the connection nor serves a pipelined request.bytes_sent < body_lengthas a failure (php-async completes a sendfile at EOF with status 0 and a short count).SEND_FILE_REFUSEDand the request is answered whole (static: the synchronous path;sendFile(): 500) instead of completing inside the HTTP/1 parser.--enable-fault-injectioncompiles libfiu fault points and_http_fault_*hooks; the Linux debug CI leg enables it.Needs true-async/php-async#308 (merged as 1521d69): Windows TransmitFile now reports a short transfer, and Darwin/FreeBSD wait out EAGAIN instead of cutting a 2 MiB body at about 1 MB.
Evidence:
h1/065(stale cache, plaintext) red 5 of 5 on main with the pipelined200glued after 4096 of 2097152 bytes,h1/068the same over TLS,h1/066andh1/067through fault points red 3 of 3; all green on Linux, macOS and Windows CI. Local suite 520 of 546 passed, 25 skipped; the one failure iscore/018's known log-ring overflow under-j4(plan item 13), passing alone.Mutants: S2, hand 10 by 28.2: 9 killed, 1 survived (fault_hooks.c name-length bound, now killed by core/083), 0 not run; base eaa2d57