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: [EMAIL PROTECTED] 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/server/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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>