1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

allow camel case response headers (#2587)

This commit is contained in:
Rob Ede
2022-01-16 03:16:26 +00:00
committed by GitHub
parent 3c7ccf5521
commit 7b8a392ef5
4 changed files with 78 additions and 1 deletions

View File

@ -258,6 +258,12 @@ impl MessageType for Response<()> {
None
}
fn camel_case(&self) -> bool {
self.head()
.flags
.contains(crate::message::Flags::CAMEL_CASE)
}
fn encode_status(&mut self, dst: &mut BytesMut) -> io::Result<()> {
let head = self.head();
let reason = head.reason().as_bytes();