Fix error message when request is too long

This commit is contained in:
Matt Brubeck 2020-05-22 19:08:00 -07:00
parent 7588b23fcb
commit 798506a03c

View file

@ -91,7 +91,7 @@ async fn parse_request<R: Read + Unpin>(mut stream: R) -> Result<Url> {
let mut len = 0;
// Read until CRLF, end-of-stream, or there's no buffer space left.
while !buf.is_empty() {
loop {
let bytes_read = stream.read(buf).await?;
len += bytes_read;
if request[..len].ends_with(b"\r\n") {