We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f4a682 commit f736d98Copy full SHA for f736d98
src/proto/h1/role.rs
@@ -701,7 +701,9 @@ impl Server {
701
// same to help developers find bugs.
702
#[cfg(debug_assertions)]
703
{
704
- if let Some(len) = headers::content_length_parse(&value) {
+ if let Some(len) = headers::content_length_parse(&value)
705
+ && (msg.req_method != &Some(Method::HEAD) || known_len != 0)
706
+ {
707
assert!(
708
len == known_len,
709
"payload claims content-length of {}, custom content-length header claims {}",
0 commit comments