Pin the handshake edges: userinfo, redirects, transport size caps - #15
Merged
Merged
Conversation
Three gaps from the spec sweep, each a place the hosts could diverge from the browser floor (or from each other) with nothing gating it. Userinfo in connect URLs was not rejected: the WHATWG constructor throws on credentials, so the jco host failed such URLs with the wrong taxonomy (connect-failed, from the constructor throw) while the native host would have connected. Both eager validators now fail invalid-url, the WIT invalid-url/connect docs name userinfo alongside fragments, and connect-invalid-url carries the case - it fails against both previous hosts (stash-verified). Handshake redirects were unpinned: browsers never follow them and tungstenite does not either, but no row asserted the shared behavior. A /redirect fault mode (302 toward a working /echo, so a client that followed would connect and expose itself) and a connect-redirect row pin connect-failed on every target. The native transport's size caps were tungstenite's fixed defaults (64 MiB message / 16 MiB frame), invisible today only because the 8 MiB buffer bound overflows first: an embedder raising the bound past the caps would get transport protocol errors (abnormal close) where a browser-backed host delivers the message into the budget's overflow-close path. The caps now scale with the configured bound, and a capacity error past them latches the same overflow taxonomy (backlog, then receive-buffer-overflow) instead of masquerading as an abnormal closure - the mid-frame read stream is torn down after the close frame is offered. That mapping is documented rather than conformance-gated: exercising it would need a >64 MiB flood.
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.
The three actionable items from the RFC 6455/WHATWG feature sweep:
invalid-url; WIT docs updated; theconnect-invalid-urlcase fails against both previous hosts (stash-verified — jco had the wrong taxonomy, native would have connected)./redirectfault mode (302 → a working/echo, so following would expose itself) +connect-redirectrow assertingconnect-failedon every target.max_inbound_buffer_bytes; capacity errors past the cap latch the overflow taxonomy instead of reporting an abnormal close. Untestable at suite scale (>64 MiB flood) — mapping documented in the pump.52×3 green,
just cigreen.