You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux [..] 6.2.0-36-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 4 10:14:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Description
The issue title says it all: After disabling the "http2" feature in axum, the h2 crate is still getting built in in the cargo build process if the "tokio" feature is enabled. I use these (and no hyper dep):
axum = { version = "0.7", default-features = false, features = ["http1", "tokio"] }
axum-extra = { version = "0.9", features = ["cookie"] }
Suspected cause
The reason for this unexpected behavior appears to be that hyper's "http2" feature is still enabled through the optional hyper-util dependency with the "server-auto" feature enabled, which is enabled in axum when enabling the "tokio" feature.
The text was updated successfully, but these errors were encountered:
Can confirm the suspected cause. I think this should likely be considered a bug in hyper-util (though unfortunately fixing it will be a breaking change).
If I understand hyperium/hyper-util#80 correctly, hyper-util now supports enabling just the server feature with http1, which would still make the auto builder available without http2 support.
So if I got that right, axum could now drop the server-auto feature in hyper-util. I think the http1 and http2 features in axum would then need to enable hyper-util?/http1 and hyper-util?/http2, respectively.
Bug Report
Version
Platform
Linux [..] 6.2.0-36-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 4 10:14:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Description
The issue title says it all: After disabling the "http2" feature in axum, the
h2
crate is still getting built in in the cargo build process if the "tokio" feature is enabled. I use these (and no hyper dep):Suspected cause
The reason for this unexpected behavior appears to be that hyper's "http2" feature is still enabled through the optional
hyper-util
dependency with the "server-auto" feature enabled, which is enabled inaxum
when enabling the "tokio" feature.The text was updated successfully, but these errors were encountered: