tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmanola...@yahoo.com
Subject Re: HTTPS Redirect/encodeURL problems (Bugzilla #269)
Date Fri, 02 Feb 2001 19:07:50 GMT
> Within Tomcat Head / 3.3 there are a host of problems with https pages and

Are those fixed in 3.2.x ? We can just use the same fix.

>  new URL(new URL(requrl), location)

So the problem is to combine requrl and location and get the encoded
redirect url.

Why not just droping new URL(...) and using some custom code ?

> 	    if(requrl.startsWith("https://")) {
> 		requrl = "http" + requrl.substring(5);
> 		url = new URL(new URL(requrl), location);
> 		return "https" + url.toString().substring(4);
> 	    } 
            
            else if( requrl.stastWith("http://")) }
                ...
            }

> Other than the fact that this has the flavor of a disgusting hack, it seems

This wouldn't be a hack at all, but a useful utility.

> Can anyone tell me why the above is a bad idea?  Or does it sound like a
> reasonable way to go?

Sounds reasonable any way, but if we can drop the URL part completely
it'll be great. We are talking about a clear and simple thing here - a
http request and a redirect.

-- 
Costin


Mime
View raw message