----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 27, 2003 10:02 AM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm RealmBase.java
> remm 2003/05/27 10:02:36 > > Modified: catalina/src/share/org/apache/catalina/realm RealmBase.java > Log: > - Refactor without using SSL URLs, similar to what is done for sendRedirect. > > Revision Changes Path > 1.13 +15 -22 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBa se.java > > Index: RealmBase.java > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/rea lm/RealmBase.java,v > retrieving revision 1.12 > retrieving revision 1.13 > diff -u -r1.12 -r1.13 > --- RealmBase.java 23 Apr 2003 16:14:12 -0000 1.12 > +++ RealmBase.java 27 May 2003 17:02:36 -0000 1.13 > @@ -72,8 +72,6 @@ > import java.security.NoSuchAlgorithmException; > import java.security.cert.X509Certificate; > import java.io.IOException; > -import java.net.URL; > -import java.net.MalformedURLException; > import java.util.Set; > > import javax.servlet.http.HttpServletRequest; > @@ -669,9 +667,15 @@ > } > > // Redirect to the corresponding SSL port > + StringBuffer file = new StringBuffer(); > String protocol = "https"; > String host = hrequest.getServerName(); > - StringBuffer file = new StringBuffer(hrequest.getRequestURI()); > + // Protocol > + file.append(protocol).append("://"); > + // Host with port > + file.append(host).append(":").append(redirectPort); > + // URI > + file.append(hrequest.getRequestURI()); I really don't like the redirect to "https:host:443/...". The easiest fix would have been to simply change the import from "java.net.URL" to "org.apache.catalina.util.URL" (or "org.apache.tomcat.util.net.URL", they are much the same). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]