Allow responses of HEAD requests to have empty DATA frames (#490)

This commit is contained in:
Yuchen Wu
2020-10-22 14:36:41 -07:00
committed by GitHub
parent cb2c7ac72b
commit 0ba7d13ae5
2 changed files with 49 additions and 1 deletions

View File

@@ -286,7 +286,11 @@ impl Stream {
Some(val) => *rem = val,
None => return Err(()),
},
ContentLength::Head => return Err(()),
ContentLength::Head => {
if len != 0 {
return Err(());
}
}
_ => {}
}