Repository navigation
fix(web): handle informational responses safely - #39
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the pinned H3 client behavior and is covered by comprehensive regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Adds safe handling for informational HTTP responses across web-cover proxying and H3 tunnels.
Changes:
- Sanitizes forwarded 1xx response headers.
- Supports up to five nonterminal H3 informational responses.
- Adds comprehensive protocol, authentication, deadline, and reuse tests.
| File | Description |
|---|---|
internal/cover/handler.go |
Filters informational response headers. |
internal/cover/informational_response_test.go |
Tests H1/H2 filtering and trace composition. |
internal/tunnel/web_h3_response.go |
Reads bounded H3 informational responses. |
internal/tunnel/web_h3_response_test.go |
Tests helper boundaries and failures. |
internal/tunnel/web_h3_client.go |
Uses final-response reader for TCP CONNECT. |
internal/tunnel/web_udp.go |
Uses final-response reader for CONNECT-UDP. |
internal/tunnel/web_h3_informational_test.go |
Tests authentication, limits, and deadlines. |
internal/tunnel/web_h3_informational_success_test.go |
Tests successful TCP/UDP traffic and reuse. |
internal/tunnel/web_cover_informational_test.go |
Tests H3 cover header filtering. |
docs/WEB_COVER.md |
Documents source-build behavior and limits. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Validation
make checkand fullmake racepassed on the frozen ten-file change.Boundaries
No dependencies, protocol, default timeout, version, release or tag changed. The H3 helper follows the pinned dependency's own complete-client response loop despite conflicting low-level method documentation; real multi-HEADERS tests protect dependency upgrades. This fixes specific compatibility and metadata filtering issues, not a claim of traffic equivalence or identification resistance. No large capture campaign or remote deployment was performed.
Exact head checks
Head
84e8d063d2a0725894364aabb84ec93bd95bcd48, first attempts all successful: CI (11 jobs), CodeQL, Linux netem integration. Container integration and OCI export, plus the netem suite, have explicit successful runtime logs. Automated review reported no findings; this is not human approval.Merged main verification
Squash/main
9e2a617200e4c634d293da5524f49ae5abfc19d1has the identical tested source tree. First push attempts all successful: CI (11 jobs), CodeQL, Linux netem integration. Main OCI/container and netem logs contain explicit successful runtime markers. The 13 focused informational-response tests repeated three times with race also passed after syncing main; all ten frozen task-file hashes and a clean checkout were rechecked.