tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
Date Thu, 03 Oct 2002 21:37:12 GMT
Bill Barker wrote:

>> I doesnt have any problems with redirs with Coyote/jk2 using https in
>> IIS, AFAIK the only use URL class had, was to try to get a absolute RUL
>> or something like that, with a Method Craig did many time ago this
>> should be unnecssary...
>>
>> I wonder how do you did the tests?
> 
> It seems that o.a.c.tomcat4/5.CoyoteResponse is using java.net.URL instead
> of Craig's o.a.c.u.URL or (the same class for 3.3) o.a.t.u.net.URL. 
> AFAIK, changing the import statement in CoyoteResponse should remove the
> need for JSSE with Coyote/jk2 for TC 4/5 (3.3 shouldn't be affected).

Unless some other piece of code is using URLs. 

I think it is safer to just set the system property - I don't think it 
can hurt anyone, and it would allow https:// URLs to work. And it'll
eliminate a difference between running tomcat standalone and with a web
server.

If you think it's a better idea to find&fix the uses of URL - I can roll
back.

Costin

>>
>>
>> > -----Mensaje original-----
>> > De: costin@apache.org [mailto:costin@apache.org]
>> > Enviado el: 3 de octubre de 2002 21:32
>> > Para: jakarta-tomcat-connectors-cvs@apache.org
>> > Asunto: cvs commit:
>> > jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
>> >
>> >
>> > costin      2002/10/03 12:31:31
>> >
>> >   Modified:    jk/java/org/apache/jk/server JkMain.java
>> >   Log:
>> >   If only Ajp connector is used, nobody will initialize the
>> > https: handler
>> >   and redirects for https sites will fail ( a URL constructor
>> > is used somewhere ).
>> >
>> >   PR: 11657
>> >   Submitted by: thomas2.maesing@bgs-ag.de
>> >
>> >   Revision  Changes    Path
>> >   1.30      +20 -0
>> > jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java
>> >
>> >   Index: JkMain.java
>> >   ===================================================================
>> >   RCS file:
>> > /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/serv
>> > er/JkMain.java,v
>> >   retrieving revision 1.29
>> >   retrieving revision 1.30
>> >   diff -u -r1.29 -r1.30
>> >   --- JkMain.java 9 Aug 2002 20:54:23 -0000 1.29
>> >   +++ JkMain.java 3 Oct 2002 19:31:31 -0000 1.30
>> >   @@ -124,12 +124,32 @@
>> >            modules.put("shm", "org.apache.jk.common.Shm");
>> >
>> > modules.put("request","org.apache.jk.common.HandlerRequest");
>> >
>> > modules.put("container","org.apache.jk.common.HandlerRequest");
>> >   +
>> >   +        initHTTPSUrls();
>> >        }
>> >
>> >        public static JkMain getJkMain() {
>> >            return jkMain;
>> >        }
>> >
>> >   +    private static String
>> > DEFAULT_HTTPS="com.sun.net.ssl.internal.www.protocol";
>> >   +    private void initHTTPSUrls() {
>> >   +        try {
>> >   +            // 11657: if only ajp is used, https:
>> > redirects need to work ( at least for 1.3+)
>> >   +            String value =
>> > System.getProperty("java.protocol.handler.pkgs");
>> >   +            if (value == null) {
>> >   +                value = DEFAULT_HTTPS;
>> >   +            } else if (value.indexOf(DEFAULT_HTTPS) >= 0  ) {
>> >   +                return; // already set
>> >   +            } else {
>> >   +                value += "|" + DEFAULT_HTTPS;
>> >   +            }
>> >   +
>> > System.setProperty("java.protocol.handler.pkgs", value);
>> >   +        } catch(Exception ex ) {
>> >   +            ex.printStackTrace();
>> >   +        }
>> >   +    }
>> >   +
>> >        // -------------------- Setting --------------------
>> >
>> >        /** Load a .properties file into and set the values
>> >
>> >
>> >
>> >
>> > --
>> > To unsubscribe, e-mail:
>> <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:tomcat-dev-help@jakarta.apache.org>
>>
>>
>> --
>> To unsubscribe, e-mail:
> <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
> <mailto:tomcat-dev-help@jakarta.apache.org>
>>

-- 
Costin



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message