tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm RealmBase.java
Date Tue, 27 May 2003 19:14:42 GMT

----- Original Message -----
From: <remm@apache.org>
To: <jakarta-tomcat-catalina-cvs@apache.org>
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message