Subject: [hybi] draft-ietf-hybi-thewebsocketprotocol-04: The example in section 1.2 is wrong

From: Iñaki Baz Castillo <[email-masked]>
Date: Sun, 23 Jan 2011 15:09:33 +0100

Hi, WebSocket handshake given as example in section 1.2 of
draft-ietf-hybi-thewebsocketprotocol-04 has a wrong
Sec-WebSocket-Accept value in the 101 response:

   The handshake from the client looks as follows:

        GET /chat HTTP/1.1
        Host: server.example.com
        Upgrade: websocket
        Connection: Upgrade
        Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
        Sec-WebSocket-Origin: http://example.com
        Sec-WebSocket-Protocol: chat, superchat
        Sec-WebSocket-Version: 4

   The handshake from the server looks as follows:

        HTTP/1.1 101 Switching Protocols
        Upgrade: websocket
        Connection: Upgrade
        Sec-WebSocket-Accept: me89jWimTRKTWwrS3aRrL53YZSo=
        Sec-WebSocket-Nonce: AQIDBAUGBwgJCgsMDQ4PEC==
        Sec-WebSocket-Protocol: chat

Sec-WebSocket-Accept value should be "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=".
Note that such value is also computed in point 3 of section 5.2.2
"Sending the server's opening handshake".

Regards.

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Sun, 23 Jan 2011 20:18:23 +0100

GET /chat HTTP/1.1
       Host: server.example.com
       Upgrade: websocket
       Connection: Upgrade

Regards.

--
Iñaki Baz Castillo
<[email-masked]>

---

From: Takeshi Yoshino <[email-masked]>
Date: Mon, 24 Jan 2011 14:57:23 +0900

Agree.

"me89jWimTRKTWwrS3aRrL53YZSo=" in both section 1.2 (page 4) and section 1.3
(page 7) should be replaced with "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=" that
corresponds to Sec-WebSocket-Key of "dGhlIHNhbXBsZSBub25jZQ==". We should
make them consistent with client handshake example not to confuse readers.

Additionally, I'd suggest that we should mention the name of the header
"Sec-WebSocket-Accept" in the paragraph starting with "Concretely, if as in
the example ...".

Takeshi

On Mon, Jan 24, 2011 at 04:18, Iñaki Baz Castillo <[email-masked]> wrote:

> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi
>