3Hren / 3Hren/cocaine-http-proxy

Implement chunked TE

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
P: medium T: feature V: minor
Dominant language
Rust
Stars
5
Forks
7
PR merge metrics
No merged PRs in 30d

Description

This can be tricky, because:

- If a response is set `Content-Length` header - we should not encode the body.
- If there neither `Content-Length` header nor `Transfer-Encoding: chunked` - we should encode the body. Hyper can do it easily.
- If there is `Transfer-Encoding: chunked` - we should firstly decode the body and to encode it again to avoid double-encoding.

Another issue is - there is some kind of accept logging. In the case of chunked TE it will be broken, as Hyper provides no way to notify when the last body chunk was written.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the HTTP response handling and Hyper integration, then inspect the accept logging path mentioned in the issue. Verify behavior for responses with Content-Length, without either header, and with Transfer-Encoding: chunked; done means bodies are encoded once and accept logging completes after the final chunk.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.