spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

plain mode with clear mode (no SSL) doesn't work? #99

Closed remoe closed 11 years ago

remoe commented 11 years ago

First, how it should work with a 'plain' sample:

Server:

cd examples/plain
node app.js

Client:

spdycat -nv -3 https://127.0.0.1:3232
[  0.007] NPN select next protocol: the remote server offers:
          * spdy/3
          * spdy/2
          * http/1.1
          * http/1.0
          NPN selected the protocol: spdy/3
[  0.016] Handshake complete
[  0.017] send SYN_STREAM frame <version=3, flags=1, length=217>
          (stream_id=1, assoc_stream_id=0, pri=3)
          :host: 127.0.0.1:3232
          :method: GET
          :path: /
          :scheme: https
          :version: HTTP/1.1
          accept: */*
          accept-encoding: gzip, deflate
          user-agent: spdylay/1.0.0
[  0.024] recv SETTINGS frame <version=3, flags=0, length=20>
          (niv=2)
          [4(1):100]
          [7(1):1048576]
[  0.063] recv SYN_REPLY frame <version=3, flags=0, length=36>
          (stream_id=1)
          :status: 200 OK
          :version: HTTP/1.1
          content-type: text/plain
[  0.063] recv DATA frame (stream_id=1, flags=0, length=13)
[  0.063] recv DATA frame (stream_id=1, flags=1, length=0)
[  0.063] send GOAWAY frame <version=3, flags=0, length=8>
          (last_good_stream_id=0)

Now, we change to clear mode:

var options = {
  plain: true,
  ssl: false,
...

and run it:

Server:

node app.js

Client:

 spdycat -nv -3 --no-tls https://127.0.0.1:3232

Then we have:

[  0.000] Handshake complete
[  0.001] send SYN_STREAM frame <version=3, flags=1, length=217>
          (stream_id=1, assoc_stream_id=0, pri=3)
          :host: 127.0.0.1:3232
          :method: GET
          :path: /
          :scheme: https
          :version: HTTP/1.1
          accept: */*
          accept-encoding: gzip, deflate
          user-agent: spdylay/1.0.0
[  0.027] recv SETTINGS frame <version=3, flags=0, length=20>
          (niv=2)
          [4(1):100]
          [7(1):1048576]
[  0.067] recv RST_STREAM frame <version=3, flags=0, length=8>
          (stream_id=1, status_code=3)
[  0.068] send GOAWAY frame <version=3, flags=0, length=8>
          (last_good_stream_id=0)

Thoughts?

remoe commented 11 years ago

@indutny , thanks. the 1.9.0 works.

indutny commented 11 years ago

you're welcome, sorry forgot to write about it here :)