Re: #385: HTTP2 Upgrade / Negotiation

On Thu, Oct 25, 2012 at 12:33 PM, Mark Nottingham <mnot@mnot.net> wrote:

>
> On 25/10/2012, at 6:10 AM, William Chan (陈智昌) <willchan@chromium.org>
> wrote:
> >
> > Could you dig up the exact bytes-on-the-wire handshake that was used?
> >
> > Er, I'm not an expert here, but here's the experiment
> http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc?view=markup&pathrev=63020and the handshake code (
> http://src.chromium.org/viewvc/chrome/trunk/src/net/websockets/websocket_handshake.cc?view=markup&pathrev=63020
> ).
>
> That's helpful, thanks.
>
>
This experiment was done by using very old WebSocket protocol. Hixie 75 or
prior. Take a look at this section to see what's sent/received
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75#section-1.2in
handshake stage. The files Will pointed contains code for newer
protocol, but older one was used to get the stats that agl@ posted to
tls@ietf.

In the experiment, Chrome did

- Send basic HTTP request
- Receive basic HTTP response

to check that the port is not blocked for normal HTTP (this is baseline).
If it's successful, it then did

- Send WebSocket handshake (HTTP Upgrade)
- Receive WebSocket handshake response
- Send "0x00 Hello 0xff" over the Web Socket
- Receive "0x00 Hello 0xff" over the Web Socket
- Wait for 1 sec (making the connection idle) to see the idle connection is
not closed immediately by anyone
- Wait for a server push message and verify (expected message is "0x00 This
message must be echoed back to the
server.\nこのメッセージがサーバにエコーバックされなければなりません。\n 0xff") (the same sentence in
English and Japanese (to check UTF-8 encoded string is transferred
correctly))
- Echo back the message to the server
- Wait for "0x00 B y e 0xff"
- Close

If all of these steps are done without any error, the experiment session
was considered to be successful. agl@'s post listed the ratio (WebSocket
success) / (HTTP success).

Thanks

Received on Thursday, 25 October 2012 10:50:10 UTC