tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
603 stars 102 forks source link

chrome can not receive data when shrpx is configured without ssl #96

Closed studytnot closed 10 years ago

studytnot commented 10 years ago

i can visit the site in spyd when ssl is enabled, but chome can not receive data when ssl is disabled. the shrpx command is: ./shrpx --no-via -b 10.42.220.52,8900 -f 0.0.0.0,8905 -n 1 -c 10 -L INFO --accesslog --frontend-spdy-no-tls --frontend-spdy-proto=spdy/3

frontend is the newest chrome(31.0.1650.57 m), backend is a reverse proxy. i debug the shrpx, the log is: [INFO] [LISTEN:0x583230] Accepted connection. fd=8 (shrpx_listen_handler.cc:97) 10.44.113.144 [Sat Nov 30 12:25:10 2013] ACCEPT [INFO] [CLIENT_HANDLER:0x59ca10] no-TLS (shrpx_client_handler.cc:143) [INFO] [UPSTREAM:0x59cbd0] before send (shrpx_spdy_upstream.cc:425) [INFO] [UPSTREAM:0x59cbd0] after send (shrpx_spdy_upstream.cc:428) [INFO] [CLIENT_HANDLER:0x59ca10] EOF (shrpx_client_handler.cc:80) [INFO] [CLIENT_HANDLER:0x59ca10] Deleting (shrpx_client_handler.cc:154) [INFO] [CLIENT_HANDLER:0x59ca10] Deleted (shrpx_client_handler.cc:172) [INFO] [CLIENT_HANDLER:0x583940] EOF (shrpx_client_handler.cc:80) [INFO] [CLIENT_HANDLER:0x583940] Deleting (shrpx_client_handler.cc:154) [INFO] [CLIENT_HANDLER:0x583940] Deleted

what's the reason?

rraptorr commented 10 years ago

AFAIK Chrome does not support SPDY without SSL. The reason is that you would need to introduce a new scheme in a web page, like spdy://, instead of http:// for browser to be able to choose proper protocol. With SSL browser negotiates SPDY at SSL layer and everything can work transparently.