v0.28.0
This commit is contained in:
1 parent
c24bc4279b
commit
3b3f0db377
84 files changed
+2686
-392
No files matched your search
@@ -283,8 +283,15 @@ pub fn validate_response(
|
||||
"invalid upstream upgrade"
|
||||
);
|
||||
ensure!(
|
||||
!headers.contains_key("transfer-encoding") && !headers.contains_key("content-length"),
|
||||
"101 response must not include body framing"
|
||||
!headers.contains_key("transfer-encoding"),
|
||||
"101 response must not use Transfer-Encoding"
|
||||
);
|
||||
ensure!(
|
||||
headers.get_all("content-length").iter().count() <= 1
|
||||
&& headers
|
||||
.get("content-length")
|
||||
.is_none_or(|value| value.to_str().is_ok_and(|value| value.trim() == "0")),
|
||||
"101 response Content-Length must be 0 when present"
|
||||
);
|
||||
for value in headers.get_all("connection").iter() {
|
||||
for field in value.to_str()?.split(',') {
|
||||
|
||||
Reference in new issue
Block a user