Update src/response.rs
Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
This commit is contained in:
@@ -477,7 +477,7 @@ fn parse_status_line(line: &str) -> Result<(ResponseStatusIndex, u16), Error> {
|
|||||||
// status-line = HTTP-version SP status-code SP reason-phrase CRLF
|
// status-line = HTTP-version SP status-code SP reason-phrase CRLF
|
||||||
let mut split: Vec<&str> = line.splitn(3, ' ').collect();
|
let mut split: Vec<&str> = line.splitn(3, ' ').collect();
|
||||||
if split.len() == 2 {
|
if split.len() == 2 {
|
||||||
// As a special case, we are lenient parsing lines without reason phrase.
|
// As a special case, we are lenient parsing lines without a space after the code.
|
||||||
// This is technically against spec. "HTTP/1.1 200\r\n"
|
// This is technically against spec. "HTTP/1.1 200\r\n"
|
||||||
split.push("");
|
split.push("");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user