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

use camel case in special headers

fixes #2595
This commit is contained in:
Rob Ede
2022-01-21 20:15:43 +00:00
parent 9668a2396f
commit 141790b200
4 changed files with 82 additions and 33 deletions

View File

@ -105,7 +105,7 @@ pub(crate) trait MessageType: Sized {
}
BodySize::Sized(0) if camel_case => dst.put_slice(b"\r\nContent-Length: 0\r\n"),
BodySize::Sized(0) => dst.put_slice(b"\r\ncontent-length: 0\r\n"),
BodySize::Sized(len) => helpers::write_content_length(len, dst),
BodySize::Sized(len) => helpers::write_content_length(len, dst, camel_case),
BodySize::None => dst.put_slice(b"\r\n"),
}
@ -213,7 +213,7 @@ pub(crate) trait MessageType: Sized {
// optimized date header, set_date writes \r\n
if !has_date {
config.set_date(dst);
config.set_date(dst, camel_case);
} else {
// msg eof
dst.extend_from_slice(b"\r\n");