Getting Effective URI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
I have a trivial server with these lines:
println!("{:?}", req.uri());
println!("{:?}", req.headers());
When I execute curl localhost:3000/foo, I get this output:
/foo
{"host": "localhost:3000", "user-agent": "curl/7.54.0", "accept": "*/*"}
When I execute curl --http2-prior-knowledge localhost:3000/foo, I get the following:
http://localhost:3000/foo
{"user-agent": "curl/7.54.0", "accept": "*/*"}
Why the difference? It would be nice to have HTTP1 and HTTP2 behave the same... I couldn't pinpoint where this is happening in the code or I'd have sent a PR.
Contributor 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.
Research direction
Start by reproducing the issue with the two curl commands and comparing the values returned by req.uri() and req.headers() for HTTP/1 and HTTP/2. Trace where those request values are constructed, then determine whether the differing behavior should be unified or documented and verify the result with coverage for both protocols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100