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

can shrpx process tls && notls data in one process and at the same time? #100

Closed studytnot closed 10 years ago

studytnot commented 10 years ago

i know shrpx can process notls data with --no-tls option, and can process tls data without the option. so my question is why i need the --no-tls flag? can shrpx judge whether the request is tls or no-tls at the run time ? can shrpx process tls and notls request in one process with the same configuration?

tatsuhiro-t commented 10 years ago

I don't think that most web servers autodetect SSL/TLS and plain HTTP. One shprx only handles only SSL/TLS or only plain HTTP, not both. Why not run 2 shrpx process for each of them? Are you suggesting a feature to share a configuration, something like "include" feature of nginx?

studytnot commented 10 years ago

why can't most web servers autodetect SSL/TLS and plain HTTP ? will this make the code more complicated ? i'm not suggesting the "include" feature. because the shrpx configuration is not so complicated now.

tatsuhiro-t commented 10 years ago

I said that because apache is not capable to do this.

Technically, you can guess the incoming data is SSL/TLS handshake or plain HTTP request, but it is still a guess. Also it certainly makes code complex. In shrpx, we rely on the fact that it is configured either SSL/TLS or plain HTTP. We don't see the merit to invest the time and energy for this complexity. This is probably WONTFIX.

studytnot commented 10 years ago

thank you so much