users@glassfish.java.net

secure web service

From: <glassfish_at_javadesktop.org>
Date: Fri, 29 Jan 2010 09:50:00 PST

I've got a jersey web service that works fine through ssl. But someone forgot to put "https" in the url: https://server:8181/webservice/stuff and it just returns an empty response. The response headers (via Firefox & LiveHeaders) in this case look like:
HTTP/0.9 200 OK

The reponse headers when accessed with https come back with the correct response and look like:
HTTP/1.1 200 OK
Servlet/2.5
Sun GlassFish Enterprise Server v2.1
text/plain
chunked
Fri, 29 Jan 2010 17:17:58 GMT


I want everything to go through ssl, and if the "s" is left out of the url, I want it to give an error page. So I turned off http-listener-1 and also removed it from the virtual server. That doesn't work, it still gives back a blank page. How do I give back an error code/page instead?

Another wrinkle is that Chrome gives back "Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error." when the url does not include the "s" in the http protocol. I don't know what IE is returning, but it gets an error, too.
[Message sent by forum member 'culli' (jim.cullison_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=383712