mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-09 04:55:27 +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;
|
let mut len = 0;
|
||||||
|
|
||||||
// Read until CRLF, end-of-stream, or there's no buffer space left.
|
// 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?;
|
let bytes_read = stream.read(buf).await?;
|
||||||
len += bytes_read;
|
len += bytes_read;
|
||||||
if request[..len].ends_with(b"\r\n") {
|
if request[..len].ends_with(b"\r\n") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue