Skip to content

Commit

Permalink
[giow] (0) Expose selected extensions on WebSocket connections; allow…
Browse files Browse the repository at this point in the history
… UAs to use compression.

git-svn-id: http://svn.whatwg.org/webapps@6190 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 6, 2011
1 parent a8e8e12 commit 227651c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 14 deletions.
26 changes: 20 additions & 6 deletions complete.html
Expand Up @@ -3532,6 +3532,7 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<li><dfn id=establish-a-websocket-connection>establish a WebSocket connection</dfn>
<li><dfn id=the-websocket-connection-is-established>the WebSocket connection is established</dfn>
<li><dfn id="validate-the-server's-response">validate the server's response</dfn>
<li><dfn id=extensions-in-use>extensions in use</dfn>
<li><dfn id=subprotocol-in-use>subprotocol in use</dfn>
<li><dfn id=headers-to-send-appropriate-cookies>headers to send appropriate cookies</dfn>
<li><dfn id="cookies-set-during-the-server's-opening-handshake">cookies set during the server's opening handshake</dfn>
Expand Down Expand Up @@ -79114,6 +79115,7 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
attribute <a href=#function>Function</a> <a href=#handler-websocket-onopen title=handler-WebSocket-onopen>onopen</a>;
<!-- attribute <span>Function</span> <span title="handler-WebSocket-onerror">onerror</span>;
--> attribute <a href=#function>Function</a> <a href=#handler-websocket-onclose title=handler-WebSocket-onclose>onclose</a>;
readonly attribute DOMString <a href=#dom-websocket-extensions title=dom-WebSocket-extensions>extensions</a>;
readonly attribute DOMString <a href=#dom-websocket-protocol title=dom-WebSocket-protocol>protocol</a>;
void <a href=#dom-websocket-close title=dom-WebSocket-close>close</a>(in optional unsigned long code, in optional DOMString reason);

Expand Down Expand Up @@ -79189,12 +79191,13 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
<li>

<p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along
with the <var title="">protocols</var> list, an empty list for the
extensions, and <var title="">origin</var>. The <i><a href=#headers-to-send-appropriate-cookies>headers to send
appropriate cookies</a></i> must be a <code title=http-Cookie>Cookie</code> header whose value is the
<i><a href=#cookie-string>cookie-string</a></i> computed from the user's cookie store and the
URL <var title="">url</var>; for these purposes this is
<em>not</em> a "non-HTTP" API. <a href=#refsWSP>[WSP]</a> <a href=#refsCOOKIES>[COOKIES]</a></p>
with the <var title="">protocols</var> list, a list containing
just "<code title="">deflate-stream</code>" for the extensions,
and <var title="">origin</var>. The <i><a href=#headers-to-send-appropriate-cookies>headers to send appropriate
cookies</a></i> must be a <code title=http-Cookie>Cookie</code>
header whose value is the <i><a href=#cookie-string>cookie-string</a></i> computed from the
user's cookie store and the URL <var title="">url</var>; for these
purposes this is <em>not</em> a "non-HTTP" API. <a href=#refsWSP>[WSP]</a> <a href=#refsCOOKIES>[COOKIES]</a></p>

<p>When the user agent <i title="validate the server's
response"><a href="#validate-the-server's-response">validates the server's response</a></i> during the
Expand Down Expand Up @@ -79252,6 +79255,14 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
</dl><p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to
<code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</p>

<p>The <dfn id=dom-websocket-extensions title=dom-WebSocket-extensions><code>extensions</code></dfn>
attribute must initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the
WebSocket connection is established</a></i>, its value might change, as
defined below.</p>

<p class=note>The <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute returns
the extensions selected by the server, if any.</p>

<p>The <dfn id=dom-websocket-protocol title=dom-WebSocket-protocol><code>protocol</code></dfn> attribute
must initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket
connection is established</a></i>, its value might change, as defined
Expand Down Expand Up @@ -79495,6 +79506,9 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
<ol><li><p>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's
value to <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code> (1).</li>

<li><p>Change the <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute's
value to the <i><a href=#extensions-in-use>extensions in use</a></i>, if is not the null value. <a href=#refsWSP>[WSP]</a></li>

<li><p>Change the <code title=dom-WebSocket-protocol><a href=#dom-websocket-protocol>protocol</a></code> attribute's value to
the <i><a href=#subprotocol-in-use>subprotocol in use</a></i>, if is not the null value. <a href=#refsWSP>[WSP]</a></li>

Expand Down
33 changes: 25 additions & 8 deletions source
Expand Up @@ -2570,6 +2570,7 @@ explained in the previous section, which talks about RFC 2119. -->
<li><dfn>establish a WebSocket connection</dfn>
<li><dfn>the WebSocket connection is established</dfn>
<li><dfn>validate the server's response</dfn>
<li><dfn>extensions in use</dfn>
<li><dfn>subprotocol in use</dfn>
<li><dfn>headers to send appropriate cookies</dfn>
<li><dfn>cookies set during the server's opening handshake</dfn>
Expand Down Expand Up @@ -89804,6 +89805,7 @@ interface <dfn>WebSocket</dfn> {
attribute <span>Function</span> <span title="handler-WebSocket-onopen">onopen</span>;
<!-- attribute <span>Function</span> <span title="handler-WebSocket-onerror">onerror</span>;
--> attribute <span>Function</span> <span title="handler-WebSocket-onclose">onclose</span>;
readonly attribute DOMString <span title="dom-WebSocket-extensions">extensions</span>;
readonly attribute DOMString <span title="dom-WebSocket-protocol">protocol</span>;
void <span title="dom-WebSocket-close">close</span>(in optional unsigned long code, in optional DOMString reason);

Expand Down Expand Up @@ -89890,14 +89892,14 @@ interface <dfn>WebSocket</dfn> {
<p><i>Establish a WebSocket connection</i> given the set (<var
title="">host</var>, <var title="">port</var>, <var
title="">resource name</var>, <var title="">secure</var>), along
with the <var title="">protocols</var> list, an empty list for the
extensions, and <var title="">origin</var>. The <i>headers to send
appropriate cookies</i> must be a <code
title="http-Cookie">Cookie</code> header whose value is the
<i>cookie-string</i> computed from the user's cookie store and the
URL <var title="">url</var>; for these purposes this is
<em>not</em> a "non-HTTP" API. <a href="#refsWSP">[WSP]</a> <a
href="#refsCOOKIES">[COOKIES]</a></p>
with the <var title="">protocols</var> list, a list containing
just "<code title="">deflate-stream</code>" for the extensions,
and <var title="">origin</var>. The <i>headers to send appropriate
cookies</i> must be a <code title="http-Cookie">Cookie</code>
header whose value is the <i>cookie-string</i> computed from the
user's cookie store and the URL <var title="">url</var>; for these
purposes this is <em>not</em> a "non-HTTP" API. <a
href="#refsWSP">[WSP]</a> <a href="#refsCOOKIES">[COOKIES]</a></p>

<p>When the user agent <i title="validate the server's
response">validates the server's response</i> during the
Expand Down Expand Up @@ -89967,6 +89969,16 @@ interface <dfn>WebSocket</dfn> {
title="dom-WebSocket-readyState">readyState</code> must be set to
<code title="dom-WebSocket-CONNECTING">CONNECTING</code> (0).</p>

<p>The <dfn
title="dom-WebSocket-extensions"><code>extensions</code></dfn>
attribute must initially return the empty string. After <i>the
WebSocket connection is established</i>, its value might change, as
defined below.</p>

<p class="note">The <code
title="dom-WebSocket-extensions">extensions</code> attribute returns
the extensions selected by the server, if any.</p>

<p>The <dfn
title="dom-WebSocket-protocol"><code>protocol</code></dfn> attribute
must initially return the empty string. After <i>the WebSocket
Expand Down Expand Up @@ -90276,6 +90288,11 @@ socket.onopen = function () {
title="dom-WebSocket-readyState">readyState</code> attribute's
value to <code title="dom-WebSocket-OPEN">OPEN</code> (1).</p></li>

<li><p>Change the <code
title="dom-WebSocket-extensions">extensions</code> attribute's
value to the <i>extensions in use</i>, if is not the null value. <a
href="#refsWSP">[WSP]</a></p></li>

<li><p>Change the <code
title="dom-WebSocket-protocol">protocol</code> attribute's value to
the <i>subprotocol in use</i>, if is not the null value. <a
Expand Down

0 comments on commit 227651c

Please sign in to comment.