Skip to content

Commit

Permalink
Editorial: Update the protocol alterations note to reflect the spec m…
Browse files Browse the repository at this point in the history
…ove (#8)

The note in "WebSocket protocol alterations" mentions the `WebSocket`
API being defined in HTML, and references the HTML spec but not Fetch.
This change updates it to reflect its new placement in the WebSockets
standard.
  • Loading branch information
Andreu Botella authored Jan 5, 2022
1 parent 7fe0f18 commit 0bd8069
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ through a custom server.</p>

<div class=note>
This section replaces part of the WebSocket protocol opening handshake client requirement to
integrate it with algorithms defined in Fetch. This way CSP, cookies, HSTS, and other Fetch-related
protocols are handled in a single location. Ideally the RFC would be updated with this language,
but it is never that easy. The WebSocket API, defined in the HTML Standard, has been updated to use
this language. [[!WSP]] [[!HTML]]
integrate it with algorithms defined in <cite>Fetch</cite>. This way CSP, cookies, HSTS, and other
<cite>Fetch</cite>-related protocols are handled in a single location. Ideally the RFC would be
updated with this language, but it is never that easy. The {{WebSocket}} API, defined below, uses
this language. [[!WSP]] [[!FETCH]]

The way this works is by replacing The WebSocket Protocol's "establish a WebSocket connection"
algorithm with a new one that integrates with Fetch. "Establish a WebSocket connection" consists of
three algorithms: setting up a connection, creating and transmiting a handshake request, and
validating the handshake response. That layering is different from Fetch, which first creates a
handshake, then sets up a connection and transmits the handshake, and finally validates the
response. Keep that in mind while reading these alterations.
algorithm with a new one that integrates with <cite>Fetch</cite>. "Establish a WebSocket
connection" consists of three algorithms: setting up a connection, creating and transmiting a
handshake request, and validating the handshake response. That layering is different from
<cite>Fetch</cite>, which first creates a handshake, then sets up a connection and transmits the
handshake, and finally validates the response. Keep that in mind while reading these alterations.
</div>


Expand Down

0 comments on commit 0bd8069

Please sign in to comment.