hyperium / http

Rust HTTP types
Apache License 2.0
1.16k stars 291 forks source link

allow camel case of header name #377

Closed xudesheng closed 4 years ago

xudesheng commented 4 years ago

I'm working on a customized websocket protocol which is using a header name "appKey" for authentication purpose. However, all customized header name is lower cased in this crate. Is there a public API which can enable acceptance of camel case of header name and don't auto lower case it?

I'm trying to use actix-ws, which is relying on this crate.

carllerche commented 4 years ago

My understanding is that case sensitive HTTP header names is invalid usage. This might need to be handled outside of http.

Darkspirit commented 4 years ago

According to HTTP standards your app must compare header names case-insensitively. Otherwise you will definitely run into compatibility problems. HTTP/2 header names are anyway lowercase.

seanmonstar commented 4 years ago

For more context, see this previous issue: https://github.com/hyperium/http/issues/228