Webrick, ssl and non-ssl on the same port

Hello all,

I have sslized webrick server, but I’d like to have some parts of server
accessible even without ssl. I’ve tried to search web and groups, but
I haven’t found anything — any suggestions, how to get ssl and nonssl
servlets on the same port?

Thanks in advance,

P.

On 10.08.2006 17:54, Pavel S. wrote:

Hello all,

I have sslized webrick server, but I’d like to have some parts of server
accessible even without ssl. I’ve tried to search web and groups, but I
haven’t found anything — any suggestions, how to get ssl and nonssl
servlets on the same port?

You could search the web for SSL protocl. I believe after connection
some message is sent in the clear to indicate SSL is to be used. You
could evaluate that and go on from there.

However, I don’t think it’s worth the effort. Note that HTTPS and HTTP
use different ports by default anyway. It’s certainly far easier to
open port 443 on the FW.

Kind regards

robert

On 8/10/06, Pavel S. [email protected] wrote:

what I think you’re proposing is not usually done for web sites. Do
you want to open a server port and have it automatically detect an
SSL/TLS client-hello so you can do an SSL handshake if present, and
simply serve the connection with no encryption otherwise? If you do
that, then how do you ensure that people will use encryption on the
sensitive pages? It’s a lot of additional logic to make that happen.
Just use two ports.

On 8/10/06, Francis C. [email protected] wrote:

P.

what I think you’re proposing is not usually done for web sites. Do
you want to open a server port and have it automatically detect an
SSL/TLS client-hello so you can do an SSL handshake if present, and
simply serve the connection with no encryption otherwise? If you do
that, then how do you ensure that people will use encryption on the
sensitive pages? It’s a lot of additional logic to make that happen.
Just use two ports.

The page is either available through http or https - these are two
different URLs. So the request should get to the right type of
service.

Of course it is simpler to use two ports (and it is the default
anyway, you would have to use a port number with either http or https
to get them use the same port). But it is an interesting idea
nontheless.

Thanks

Michal

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs