Skip to content

Fix edge-http framing of HEAD, 1xx, 204 and 304 responses - with conflict resolution - #111

Merged
ivmarkov merged 2 commits into
masterfrom
pr-110
Nov 9, 2026
Merged

ivmarkov merged 2 commits into
masterfrom
pr-110

Conversation

@ivmarkov

@ivmarkov ivmarkov commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

zolstein and others added 2 commits November 9, 2026 16:29
These responses never have a body, but edge-http chose their framing
from the headers alone. A HEAD or 304 response carrying the GET's
`Content-Length` failed with `IncompleteBody` and closed the connection.
A HEAD or 204 response with no body header was sent chunked, which the
client read as the start of the next response.

The server now sends these responses with no body and adds no
`Content-Length` or `Transfer-Encoding`. A non-empty body write fails
with `TooLongBody`. A 1xx or 204 response with `Transfer-Encoding` or a
non-zero `Content-Length` is rejected, and a `Content-Length: 0` header
is dropped.

The client now reads these responses as bodiless too, and rejects
interim 1xx responses (other than 101), which it does not support.

`ws::upgrade_response_headers` no longer returns `Content-Length: 0`,
which is not allowed on a 101; `UPGRADE_RESPONSE_HEADERS_LEN` is now 3.
@ivmarkov
ivmarkov merged commit e60eb63 into master Nov 9, 2026
4 checks passed
@ivmarkov
ivmarkov deleted the pr-110 branch November 9, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants