Repository navigation
Conversation
Continue reading and forwarding interim responses until the final HTTP response, and treat 101 as terminal. Extend the existing response test with fragmented interim chains and verify the final body. Assisted-by: Codex Signed-off-by: Eljees <3.14hell@gmail.com>
Member
|
|
Member
|
够用就行了 plain mode 跑这些个应该已经非常少见了 |
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 plain HTTP inbound forwards the first informational response and then treats the next response as final. For an origin sending
103 → 103 → 200, the client receives the two103headers but loses the final200and its body. Multiple Early Hints responses are explicitly permitted by RFC 8297 §2.Repeat the existing raw-header forwarding until the final response, retaining the status-prefix and adaptive peek from #7298. Treat
101 Switching Protocolsas terminal in this helper so it does not wait for another HTTP response or consume the following opaque bytes. This does not add full Upgrade tunneling to the inbound.Extend the existing test with no interim response, single
100/103, repeated103, and100 → 103, checking the exact forwarded bytes, final status and body throughiotest.OneByteReader. Add a bounded101termination check. The regression tests use no network, timers or goroutines.Validation:
101case; four other cases pass.103 → 103 → 200, while three controls pass; all four cases pass after the fix.go vet, main build and repository format check pass.-race; scopedgo vetand main build pass. The scenario harness is race-instrumented; its unchanged helper builds ordinary child Xray binaries.AI assistance: Codex assisted with implementation, tests and review.