mirror of
https://github.com/samsonjs/agate.git
synced 2026-04-02 10:25:48 +00:00
Fix error message when request is too long
This commit is contained in:
parent
7588b23fcb
commit
798506a03c
1 changed files with 1 additions and 1 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue