Browse Source

Fix transfer-encoding detection case-sensitiveness

tags/v1.4.1
Jens Pitkänen 2 months ago
parent
commit
5f42d55d40
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/connection.rs

+ 3
- 1
src/connection.rs View File

@@ -202,7 +202,9 @@ fn read_from_stream<T: Read>(stream: T, head: bool) -> Result<Vec<u8>, Error> {
}
}
} else if let Some((key, value)) = http::parse_header(new_response_length_str) {
if key.trim() == "Transfer-Encoding" && value.trim() == "chunked" {
if key.to_lowercase().trim() == "transfer-encoding"
&& value.to_lowercase().trim() == "chunked"
{
chunked = true;
}
}

Loading…
Cancel
Save