-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: another cut at fixing HTTP framing
For keep-alive connections it's neither sufficient to cut at the end of header (since the rest of the response would leak into next request), nor just fan out the current SSL frame (since the SSL framing is effectively undefined and we don't know if we're done yet and with non-blocking reads we're likely to just terminate too early). So, let's just obey the Content-Length header. If it's missing (chunked encoding or standards violation) then read until the EOF, but still succeed if the header was complete. This way we're hopefully on the safe side.
- Loading branch information
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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