Bound HTTP/1 request metadata queue under pipelining
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- networking
Research direction
Start in src/http_proxy.rs at proxy_http1_rewriting and rewrite_request_stream, then trace how request metadata corresponds to ordinary requests, HEAD, interim 1xx responses, Upgrade, and CONNECT. Run the existing HTTP/1 rewriting tests before adding a withheld-response upstream test that proves metadata stays bounded, and include the MAX_HEADER_SIZE + 1 rejection case for the exact 64 KiB boundary.
Written by the indexing model from the issue text.
Description
Follow-up from the post-merge review of #23.
Problem
The HTTP/1 rewriting path creates a tokio::sync::mpsc::unbounded_channel for request/response correspondence. rewrite_request_stream queues one RequestMeta before every forwarded request.
If an upstream continues reading requests but delays its responses, an unauthenticated client can pipeline requests indefinitely. The request pump continues adding metadata while the response pump cannot drain it, allowing per-connection memory growth without a defined bound.
This affects routes using HTTP header rewriting for X-Forwarded-For or JA3/JA4 forwarding.
Location
src/http_proxy.rs:proxy_http1_rewriting,rewrite_request_stream- Introduced by #23 while fixing Upgrade/CONNECT response correspondence.
Acceptance criteria
- Replace the unbounded metadata channel with bounded backpressure or enforce a documented maximum number of outstanding pipelined requests.
- The request pump must stop advancing when the response side reaches that limit.
- Preserve correct correspondence for ordinary requests, HEAD, interim 1xx responses, Upgrade, and CONNECT.
- Add a test with an upstream that reads requests but withholds responses, proving queued metadata remains bounded.
- Include the exact 64 KiB request-header boundary in the test cleanup:
MAX_HEADER_SIZE + 1must be rejected rather than relying on the current 70 KiB case.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HarperFast/symphony
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/symphony#91 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
HarperFast/symphony#89 ·
Maintainers usually reply within 1 day
-
Mixed-case SNI forwarded to an older peer during a rolling upgrade can reach its wildcard routeOpen
Difficulty 4/5 3-5 days Newbie friendliness 49/100
HarperFast/symphony#93 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
HarperFast/symphony#92 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
HarperFast/symphony#90 ·
Maintainers usually reply within 1 day
All issues in HarperFast/symphony
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
feature request needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
solidjs/solid-docs#1716 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
thecodacus/pithagoras#380 ·
Maintainers usually reply within 1 day