tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rumney <jrum...@att.com>
Subject Re: Tomcat 3.1 + HTTPS + redirects
Date Mon, 07 Aug 2000 09:00:19 GMT
Jason Rumney <jrumney@att.com> writes:

> Eric Simpson <esimp@home.com> writes:
> 
> > I'm assuming its redirecting you to the internal web server
> > name instead of the external name right?

To clarify: the problem is not the server name, it is the scheme. I am
being redirected to http://... instead of https://...

> > I got around this by using this redirect code.
> > 
> > response.sendRedirect(request.getScheme() + "://" + reqeust.getServerName()
> > + ":" + request.getServerPort());
> > 
> > and it makes the code a lot more portable also. Hope this
> > helps.
> 
> Thanks,
> 
> 
> it seems response.sendRedirect(request.getScheme() + ":" + encoded_url);
> is sufficient to take care of my problem.

Actually, it seems that in my haste to get this resolved on Friday, I
tested the wrong bit of code (it was doing a forward, not a redirect),
and the above does not, in fact, work.

The problem is that request.getScheme() returns "http", even when the
scheme being used is "https", so things are no better than using the
bare relative URL.

Can anyone offer any suggestions on getting this working?


-- 
Jason Rumney <jrumney@att.com>
AT&T Labs (Redditch, UK)


Mime
View raw message