Marc,
In terms of connectors, I think request.isSecure() only works with ajp13.
So, if a user is connected via ajp12, and the web server tries to do a
url-rewriting of an https URL, I think this code will get it wrong. It
might be better to check the request url itself to see if it begins with
"https://" (case-insensitively).
-Dan
[EMAIL PROTECTED] wrote:
>
> marcsaeg 01/04/16 09:02:13
>
> Modified: src/share/org/apache/tomcat/facade Tag: tomcat_32
> HttpServletResponseFacade.java
> Log:
> Completes the fix for Bugzilla 578. In addtion to needing the protocol handler
>for HTTPS, the URL encoder also needs to properly determine the default port for
>secure connections in addition to normal HTTP connections.
>
> PR: 578
> Submitted by: [EMAIL PROTECTED] (Santiago Gala)
>
> Revision Changes Path
> No revision
>
>
> No revision
>
>
> 1.6.2.4 +10 -7
>jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/HttpServletResponseFacade.java
>
> Index: HttpServletResponseFacade.java
> ===================================================================
> RCS file:
>/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/HttpServletResponseFacade.java,v
> retrieving revision 1.6.2.3
> retrieving revision 1.6.2.4
> diff -u -r1.6.2.3 -r1.6.2.4
> --- HttpServletResponseFacade.java 2001/03/06 17:38:13 1.6.2.3
> +++ HttpServletResponseFacade.java 2001/04/16 16:02:12 1.6.2.4
> @@ -1,7 +1,7 @@
> /*
> - * $Header:
>/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/HttpServletResponseFacade.java,v
> 1.6.2.3 2001/03/06 17:38:13 marcsaeg Exp $
> - * $Revision: 1.6.2.3 $
> - * $Date: 2001/03/06 17:38:13 $
> + * $Header:
>/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/HttpServletResponseFacade.java,v
> 1.6.2.4 2001/04/16 16:02:12 marcsaeg Exp $
> + * $Revision: 1.6.2.4 $
> + * $Date: 2001/04/16 16:02:12 $
> *
> * ====================================================================
> *
> @@ -353,11 +353,14 @@
> return (false);
> if (!request.getServerName().equalsIgnoreCase(url.getHost()))
> return (false);
> - // Set the URL port to HTTP default if not available before comparing
> - int urlPort = url.getPort();
> - if (urlPort == -1) {
> + // Set the URL port to the HTTP(S) default if not available before comparing
> + int urlPort = url.getPort();
> + if (urlPort == -1) {
> + if(request.isSecure())
> + urlPort = 443;
> + else
> urlPort = 80;
> - }
> + }
> if (request.getServerPort() != urlPort)
> return (false);
> String contextPath = request.getContext().getPath();
>
>
>
--
Dan Milstein // [EMAIL PROTECTED]