Repository navigation
Conversation
xia-chao
requested review from
cfallin and
rvolosatovs
and removed request for
a team
October 24, 2026 12:01
xia-chao
force-pushed
the
p3-serve-missing-authority
branch
from
October 24, 2026 12:43
eafb7cd to
83d4a8d
Compare
pchickey
requested changes
Oct 26, 2026
| stream.write_all(b"GET / HTTP/1.1\r\n\r\n").await?; | ||
| let mut response = Vec::new(); | ||
| let mut buf = [0; 512]; | ||
| while !response.ends_with(b"</html>") && response.len() < 8192 { |
Contributor
There was a problem hiding this comment.
Reading in a timeout loop is the wrong approach - we want a timeout for the total read, which should use AsyncReadExt::read_to_end, not this loop that appends to the buffer (and uses a fragile heuristic for ending the response)
Contributor
Author
There was a problem hiding this comment.
you didn't consider that read to end waits for eof, and a keep alive 400 never closes the connection, so it just times out that's why the request sends connection: close.
p2 already answers 400 for these; the p3 path left the request to the handler with a `none` authority.
xia-chao
force-pushed
the
p3-serve-missing-authority
branch
from
October 27, 2026 09:45
83d4a8d to
4696408
Compare
pchickey
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#14432 has already fixed the "missing authority/Host ⇒ 400" for p2; this just makes p3 consistent (p3 still passes the request straight to the handler).