I need a way to check whether the current servlet was accessed through https
or not. If not, I want to rewrite the url to https and inform the user. How
can I check this?
You can overwrite the respond method with something like this:
def respond(self, transaction):
request = self.request()
if request.environ()['SERVER_PORT'] != 443:
url = request.serverURLDir()
if request.hasField('path'):
url += request.field('path')
url = 'https://' + url
self.sendRedirectAndEnd(url)
else:
SitePage.respond(self, transaction)
Or, try to do it using Apache rewrite (there are probably a lot of
howtos in the Internet).
-- Christoph
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss