Replies: 2 comments 5 replies
-
I don't know enough about h2 to answer but I suppose it's an inherent thing in h2 and not a bug. Does https://docs.rs/axum/latest/axum/extract/struct.Host.html work? If you need more help I suggest you ask in |
Beta Was this translation helpful? Give feedback.
-
per https://httpwg.org/specs/rfc7540.html#HttpRequest
be aware that: Clients that generate HTTP/2 requests directly SHOULD use the also related: grpc/grpc#1025 you should use "host" header field if ":authority" is not present |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Report
Version
24f8dc5 (head)
Platform
Linux lab-phgl 6.2.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 30 Mar 2023 14:51:14 +0000 x86_64 GNU/Linux
Crates
Cargo.tom:
Description
I cannot extract the host header (I have not tried other headers), if using http2. i needed to use
--http2-prior-knowledge
or https (using the axum-server crate).curl --http2 --http2-prior-knowledge -v 'http://localhost:3000/'
works, but
curl --http2 --http2-prior-knowledge -v 'http://localhost:3000/host'
breaks.
I tried this code:
I expected to see this happen:
With the above curl command, I expect:
(status 200)
Instead, this happened:
(status 400)
Beta Was this translation helpful? Give feedback.
All reactions