Skip to content

Getting Effective URI #1612

Open
Open
@rolftimmermans

Description

@rolftimmermans

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-serverArea: server.B-rfcBlocked: More comments would be useful in determine next steps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions