Open
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.