Re: Problem with different protocols and ports

2010-03-25 Thread Peter Crowther
This is a feature of the protocol; there's nothing you can do about idiot
users who type strange things into their browsers' address bars.

What you *can* do is run your services on the standard ports - 80 and 443 -
so that your users don't have to type in port numbers.  Is there any reason
you're not using the standard ports for this application?

- Peter

On 25 March 2010 14:47, Hagenlocher-Wemssen, Andreas 
andreas.hagenlocher-wems...@siemens.com wrote:

 Hi all,

 I got a peculiar problem on a apache tomcat 5.5 server:

 Several clients, which could use the wrong port for their protocol.

 On the server there is a http port on 8080, and a https port on 8443 as
 default.

 Unfortunately, on the clients there are possibilities to combine the
 protocol freely with a port, so It could be that they try to connect with
 https to 8080 (which results in a timeout on the client, triggering a error
 message),

 Or with http to 8443, which gets a rather unpleasant surprise, they get a
 page, without an error message, with some cryptic characters:

 

 [1][1]

 I would like to get a error message back ... can anyone help me?



 Andreas Hagenlocher-Wemßen




RE: Problem with different protocols and ports

2010-03-25 Thread Hagenlocher-Wemssen, Andreas
Unfortunately, it has to be open in case they use the ports on other apps. One 
of the selling points. Ok, then I just have to live with it.
Thanks
Andreas

-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On 
Behalf Of Peter Crowther
Sent: Donnerstag, 25. März 2010 16:02
To: Tomcat Users List
Subject: Re: Problem with different protocols and ports

This is a feature of the protocol; there's nothing you can do about idiot
users who type strange things into their browsers' address bars.

What you *can* do is run your services on the standard ports - 80 and 443 -
so that your users don't have to type in port numbers.  Is there any reason
you're not using the standard ports for this application?

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with different protocols and ports

2010-03-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas,

On 3/25/2010 11:38 AM, Hagenlocher-Wemssen, Andreas wrote:
 Unfortunately, it has to be open in case they use the ports on other
 apps. One of the selling points. Ok, then I just have to live with
 it.

Yeah, I think you're stuck: all of the connecting mechanics happen at a
level that is lower than either your client or your webapp's code:
there's very little you can do, here.

On the webapp's side, Tomcat won't even get a notification that a client
/tried/ to connect because the SSL handshake will fail (from either end
if HTTP is attempted on HTTPS). If the client uses HTTPS to connect to
your HTTP service, Tomcat will end up replying with a 400 Bad Request
response, which you /might/ be able to handle, yet not meaningfully
(because there is no sane HTTP request).

I dunno about Tomcat, but IIRC the default message for Apache httpd when
you attempt to use HTTPS to connect to the (plain) HTTP server is that
you get a message saying It looks like you're speaking HTTPS to me,
though the client might not read it properly since it's trying to use
SSL to connect before it reads any of the response.

Basically, everyone loses when you have an HTTP-HTTPS mismatch. :(

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkurwtwACgkQ9CaO5/Lv0PAdQwCfZxobgiISCE8f0NeK5JJRu4vc
LrAAn24UwWoZKaqsnpLIVxUGeDkl7DEC
=pIMW
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org