svn commit: r307246 - /tomcat/container/branches/tc3.3.x/build.xml
Author: billbarker Date: Fri Oct 7 20:11:35 2005 New Revision: 307246 URL: http://svn.apache.org/viewcvs?rev=307246view=rev Log: Update for new structure Modified: tomcat/container/branches/tc3.3.x/build.xml Modified: tomcat/container/branches/tc3.3.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc3.3.x/build.xml?rev=307246r1=307245r2=307246view=diff == --- tomcat/container/branches/tc3.3.x/build.xml (original) +++ tomcat/container/branches/tc3.3.x/build.xml Fri Oct 7 20:11:35 2005 @@ -60,7 +60,7 @@ !-- External repositories -- property name=jakarta-tomcat-connectors -location=${ws}/jakarta-tomcat-connectors / +location=../connectors / property name=jakarta-commons location=${ws}/jakarta-commons / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelNioSocket.java ChannelSocket.java
billbarker2005/09/24 16:53:23 Modified:jk/java/org/apache/jk/common ChannelNioSocket.java ChannelSocket.java Log: Gracefully handle the case where some Socket options are disabled at the OS level. For reasons known only to Sun, Socket.setSoLinger actually throws an exception on some Solaris systems. Since I'm betting that virtually nobody ever sets this option explictly, just log the error at DEBUG level and continue on. Revision ChangesPath 1.7 +17 -6 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java Index: ChannelNioSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ChannelNioSocket.java 27 Jul 2005 15:12:01 - 1.6 +++ ChannelNioSocket.java 24 Sep 2005 23:53:22 - 1.7 @@ -34,6 +34,7 @@ import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; +import java.net.SocketException; import javax.management.ListenerNotFoundException; import javax.management.MBeanNotificationInfo; @@ -320,12 +321,12 @@ ep.setNote( socketNote, s ); if(log.isDebugEnabled() ) log.debug(Accepted socket + s + channel + sc.isBlocking()); -if( linger 0 ) -s.setSoLinger( true, linger); -if( socketTimeout 0 ) -s.setSoTimeout( socketTimeout ); - -s.setTcpNoDelay( tcpNoDelay ); // set socket tcpnodelay state + +try { +setSocketOptions(s); +} catch(SocketException sex) { +log.debug(Error initializing Socket Options, sex); +} requestCount++; @@ -337,6 +338,16 @@ ep.setControl( tp ); } +private void setSocketOptions(Socket s) throws SocketException { +if( socketTimeout 0 ) +s.setSoTimeout( socketTimeout ); + +s.setTcpNoDelay( tcpNoDelay ); // set socket tcpnodelay state + +if( linger 0 ) +s.setSoLinger( true, linger); +} + public void resetCounters() { requestCount=0; } 1.58 +16 -6 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- ChannelSocket.java27 Jul 2005 15:12:01 - 1.57 +++ ChannelSocket.java24 Sep 2005 23:53:22 - 1.58 @@ -294,12 +294,12 @@ ep.setNote( socketNote, s ); if(log.isDebugEnabled() ) log.debug(Accepted socket + s ); -if( linger 0 ) -s.setSoLinger( true, linger); -if( socketTimeout 0 ) -s.setSoTimeout( socketTimeout ); - -s.setTcpNoDelay( tcpNoDelay ); // set socket tcpnodelay state + +try { +setSocketOptions(s); +} catch(SocketException sex) { +log.debug(Error initializing Socket Options, sex); +} requestCount++; @@ -314,6 +314,16 @@ ep.setControl( tp ); } +private void setSocketOptions(Socket s) throws SocketException { +if( socketTimeout 0 ) +s.setSoTimeout( socketTimeout ); + +s.setTcpNoDelay( tcpNoDelay ); // set socket tcpnodelay state + +if( linger 0 ) +s.setSoLinger( true, linger); +} + public void resetCounters() { requestCount=0; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
billbarker2005/09/24 17:27:53 Modified:catalina/src/share/org/apache/catalina/core StandardContext.java Log: Fix problem of double-init when JMX-deploying a Context into a started Host. It doesn't seem possible to stop init being called twice in this scenario (at least with the current JMX-deployment logic :), so let the second call do the actual work and make the first call quit. Based on a patch submitted by: Darran Lofthouse Fix for Bug #36802 Revision ChangesPath 1.177 +5 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.176 retrieving revision 1.177 diff -u -r1.176 -r1.177 --- StandardContext.java 12 Sep 2005 00:19:38 - 1.176 +++ StandardContext.java 25 Sep 2005 00:27:53 - 1.177 @@ -5034,6 +5034,10 @@ destroy(); throw e; } +// It's possible that addChild may have started us +if( initialized ) { +return; +} } super.init(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/09/24 19:16:42 Modified:webapps/docs changelog.xml Log: Update to 5.5.13, and doc changes Revision ChangesPath 1.380 +36 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.379 retrieving revision 1.380 diff -u -r1.379 -r1.380 --- changelog.xml 22 Sep 2005 17:20:21 - 1.379 +++ changelog.xml 25 Sep 2005 02:16:42 - 1.380 @@ -26,6 +26,42 @@ /p /section +section name=Tomcat 5.5.13 (yoavs) + subsection name=General +changelog +/changelog + /subsection + subsection name=Catalina +changelog + fix +bug36802/bug: Fix problem of double-init when JMX-deploying a +Context into a started Host. (billbarker) + /fix +/changelog + /subsection + subsection name=Coyote +changelog + fix +Gracefully handle the case where some Socket options are disabled at +the OS level for the AJP/1.3 Connector. (billbarker) + /fix +/changelog + /subsection + subsection name=Jasper +changelog +/changelog + /subsection + subsection name=Cluster +changelog +/changelog + /subsection + subsection name=Webapps +changelog + fixRemove obsolete TagPlugin file from JSP examples (billbarker)/fix +/changelog + /subsection +/section + section name=Tomcat 5.5.12 (yoavs) subsection name=General changelog - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r290718 - /tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/tagPlugins.xml
Author: billbarker Date: Wed Sep 21 07:53:12 2005 New Revision: 290718 URL: http://svn.apache.org/viewcvs?rev=290718view=rev Log: Remove obsolete TagPlugin file Removed: tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/tagPlugins.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r289880 - /tomcat/container/branches/tc3.3.x/build.xml
Author: billbarker Date: Sat Sep 17 19:21:56 2005 New Revision: 289880 URL: http://svn.apache.org/viewcvs?rev=289880view=rev Log: By default, exclude the digester code from the j-t-c/util build. All of our XML-parsing is simplier than that, and it shrinks the jar file size. Modified: tomcat/container/branches/tc3.3.x/build.xml Modified: tomcat/container/branches/tc3.3.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc3.3.x/build.xml?rev=289880r1=289879r2=289880view=diff == --- tomcat/container/branches/tc3.3.x/build.xml (original) +++ tomcat/container/branches/tc3.3.x/build.xml Sat Sep 17 19:21:56 2005 @@ -92,6 +92,7 @@ property name=tomcat-util.jar location=${jtc.util.build}/lib/tomcat-util.jar/ + property name=skip.digester value=true / property name=jtc.coyote.home location=${jakarta-tomcat-connectors}/coyote/ property name=jtc.coyote.lib location=${jtc.coyote.home}/build/lib/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core LocalStrings.properties StandardContext.java
billbarker2005/09/11 17:19:39 Modified:catalina/src/share/org/apache/catalina/core LocalStrings.properties StandardContext.java Log: Per section 13.2 of the spec, warn if CR or LF is found in a url-pattern. Fix for Bug #36599 Revision ChangesPath 1.24 +1 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/LocalStrings.properties,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- LocalStrings.properties 1 Aug 2005 12:13:59 - 1.23 +++ LocalStrings.properties 12 Sep 2005 00:19:38 - 1.24 @@ -46,6 +46,7 @@ standardContext.applicationListener=Error configuring application listener of class {0} standardContext.applicationSkipped=Skipped installing application listeners due to previous error(s) standardContext.badRequest=Invalid request path ({0}). +standardContext.crlfinurl=The URL pattern {0} contains a CR or LF and so can never be matched. standardContext.errorPage.error=Error page location {0} must start with a ''/'' standardContext.errorPage.required=ErrorPage cannot be null standardContext.errorPage.warning=WARNING: Error page location {0} must start with a ''/'' in Servlet 2.4 1.176 +4 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.175 retrieving revision 1.176 diff -u -r1.175 -r1.176 --- StandardContext.java 27 Jul 2005 15:11:21 - 1.175 +++ StandardContext.java 12 Sep 2005 00:19:38 - 1.176 @@ -4827,6 +4827,9 @@ if (urlPattern == null) return (false); +if (urlPattern.indexOf('\n') = 0 || urlPattern.indexOf('\r') = 0) { + getLogger().warn(sm.getString(standardContext.crlfinurl,urlPattern)); +} if (urlPattern.startsWith(*.)) { if (urlPattern.indexOf('/') 0) return (true); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/08/28 18:14:45 Modified:webapps/docs changelog.xml Log: Doc changes Revision ChangesPath 1.364 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.363 retrieving revision 1.364 diff -u -r1.363 -r1.364 --- changelog.xml 26 Aug 2005 12:31:05 - 1.363 +++ changelog.xml 29 Aug 2005 01:14:45 - 1.364 @@ -37,6 +37,9 @@ subsection name=Catalina changelog + fix +bug36343/bug: Only normalize out backslash on Windows platforms. (billbarker) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources FileDirContext.java
billbarker2005/08/27 17:52:14 Modified:catalina/src/share/org/apache/naming/resources FileDirContext.java Log: Only normalize out backslash on Windows platforms. On *nix systems, backslash is a perfectly valid (if somewhat strange :) file name character, so Tomcat shouldn't deny access to files containing it. Fix for Bug #36343 Revision ChangesPath 1.10 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/FileDirContext.java Index: FileDirContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- FileDirContext.java 27 Jun 2005 21:54:35 - 1.9 +++ FileDirContext.java 28 Aug 2005 00:52:14 - 1.10 @@ -772,7 +772,7 @@ String normalized = path; // Normalize the slashes and add leading slash if necessary -if (normalized.indexOf('\\') = 0) +if (File.separatorChar == '\\' normalized.indexOf('\\') = 0) normalized = normalized.replace('\\', '/'); if (!normalized.startsWith(/)) normalized = / + normalized; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm UserDatabaseRealm.java
billbarker2005/08/17 21:41:02 Modified:catalina/src/share/org/apache/catalina/realm UserDatabaseRealm.java Log: Clean up previous patch so it works with Custom UserDatabases, not just the Memory one. Revision ChangesPath 1.14 +22 -18 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java Index: UserDatabaseRealm.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- UserDatabaseRealm.java17 Aug 2005 10:40:33 - 1.13 +++ UserDatabaseRealm.java18 Aug 2005 04:41:02 - 1.14 @@ -142,6 +142,12 @@ * @param role Security role to be checked */ public boolean hasRole(Principal principal, String role) { +if( principal instanceof GenericPrincipal) { +GenericPrincipal gp = (GenericPrincipal)principal; +if(gp.getUserPrincipal() instanceof User) { +principal = gp.getUserPrincipal(); +} +} if(! (principal instanceof User) ) { //Play nice with SSO and mixed Realms return super.hasRole(principal, role); @@ -203,29 +209,27 @@ */ protected Principal getPrincipal(String username) { -Principal principal = database.findUser(username); -if(principal instanceof GenericPrincipal) -return principal ; - +User user = database.findUser(username); +if(user == null) { +return null; +} + List roles = new ArrayList(); -if(principal instanceof MemoryUser) { -MemoryUser user = (MemoryUser)principal; -Iterator uroles = user.getRoles(); +Iterator uroles = user.getRoles(); +while(uroles.hasNext()) { +Role role = (Role)uroles.next(); +roles.add(role.getName()); +} +Iterator groups = user.getGroups(); +while(groups.hasNext()) { +Group group = (Group)groups.next(); +uroles = user.getRoles(); while(uroles.hasNext()) { Role role = (Role)uroles.next(); roles.add(role.getName()); } -Iterator groups = user.getGroups(); -while(groups.hasNext()) { -Group group = (Group)groups.next(); -uroles = user.getRoles(); -while(uroles.hasNext()) { -Role role = (Role)uroles.next(); -roles.add(role.getName()); -} -} } -return new GenericPrincipal(this, username, getPassword(username), roles, principal); +return new GenericPrincipal(this, username, user.getPassword(), roles, user); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Response.java
billbarker2005/08/05 21:25:27 Modified:catalina/src/share/org/apache/catalina/connector Response.java Log: Make certain that URL is loaded early for sandbox. Since TC 5.5.x requires JDK 1.4+, we should probably consider using the URI class for this (which is what o.a.t.u.net.URL is a replacement for :). We need to check that it handles all the cases correctly (including IPv6). Fix for Bug #35033 Revision ChangesPath 1.14 +5 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Response.java Index: Response.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Response.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Response.java 21 May 2005 03:02:25 - 1.13 +++ Response.java 6 Aug 2005 04:25:27 - 1.14 @@ -66,6 +66,10 @@ // --- Constructors +static { +// Ensure that URL is loaded for SM +URL.isSchemeChar('c'); +} public Response() { urlEncoder.addSafeCharacter('/'); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security SecurityClassLoad.java
billbarker2005/08/03 23:07:46 Modified:catalina/src/share/org/apache/catalina/security SecurityClassLoad.java Log: Fix CNFE when starting in a sandbox. After the last refactoring, the Jk-Java Connector no longer has need of PAs. If this changes, the method can always be added back. Revision ChangesPath 1.18 +1 -12 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java Index: SecurityClassLoad.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/security/SecurityClassLoad.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- SecurityClassLoad.java24 Jul 2004 07:07:37 - 1.17 +++ SecurityClassLoad.java4 Aug 2005 06:07:46 - 1.18 @@ -43,7 +43,6 @@ loadJavaxPackage(loader); loadCoyotePackage(loader); loadHttp11Package(loader); -loadJkPackage(loader); } @@ -198,15 +197,5 @@ Response$3); } -private final static void loadJkPackage(ClassLoader loader) -throws Exception { -String basePackage = org.apache.jk.; -loader.loadClass -(basePackage + - server.JkCoyoteHandler$1); -loader.loadClass -(basePackage + - server.JkCoyoteHandler$StatusLinePrivilegedAction); -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/08/03 23:17:07 Modified:webapps/docs changelog.xml Log: doc changes Revision ChangesPath 1.351 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.350 retrieving revision 1.351 diff -u -r1.350 -r1.351 --- changelog.xml 2 Aug 2005 18:12:05 - 1.350 +++ changelog.xml 4 Aug 2005 06:17:07 - 1.351 @@ -65,6 +65,9 @@ update bug34794/bug: Update connector documentation to include clientAuth attribute. (yoavs) /update + fix +bug35894/bug: Fix CNFE when starting in a sandbox. (billbarker) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
billbarker2005/07/21 21:16:25 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Log: Return a custom tag to the pool when doEndTag returns SKIP_PAGE Submitted by: Jan Revision ChangesPath 1.242 +9 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.241 retrieving revision 1.242 diff -u -r1.241 -r1.242 --- Generator.java21 Jul 2005 03:59:10 - 1.241 +++ Generator.java22 Jul 2005 04:16:24 - 1.242 @@ -2281,8 +2281,15 @@ .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {); out.pushIndent(); if(!n.implementsTryCatchFinally()) { -out.printin(tagHandlerVar); -out.println(.release();); +if(isPoolingEnabled) { +out.printin(n.getTagHandlerPoolName()); +out.print(.reuse(); +out.print(tagHandlerVar); +out.println();); +} else { +out.printin(tagHandlerVar); +out.println(.release();); +} } if (isTagFile || isFragment) { out.printil(throw new SkipPageException();); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
billbarker2005/07/20 20:59:10 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Log: Make certain that release is called for custom tags when tag-pooling is disabled. Fix for Bug #35696 Revision ChangesPath 1.241 +9 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.240 retrieving revision 1.241 diff -u -r1.240 -r1.241 --- Generator.java5 Apr 2005 23:14:43 - 1.240 +++ Generator.java21 Jul 2005 03:59:10 - 1.241 @@ -2278,15 +2278,19 @@ out.printin(if (); out.print(tagHandlerVar); out.println( -.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)); +.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {); out.pushIndent(); +if(!n.implementsTryCatchFinally()) { +out.printin(tagHandlerVar); +out.println(.release();); +} if (isTagFile || isFragment) { out.printil(throw new SkipPageException();); } else { out.printil((methodNesting 0) ? return true; : return;); } out.popIndent(); - +out.printil(}); // Synchronize AT_BEGIN scripting variables syncScriptingVars(n, VariableInfo.AT_BEGIN); @@ -2317,6 +2321,9 @@ out.print(.reuse(); out.print(tagHandlerVar); out.println();); +} else { +out.printin(tagHandlerVar); +out.println(.release();); } if (n.implementsTryCatchFinally()) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/07/20 21:12:33 Modified:webapps/docs changelog.xml Log: Doc changes Revision ChangesPath 1.324 +7 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.323 retrieving revision 1.324 diff -u -r1.323 -r1.324 --- changelog.xml 20 Jul 2005 21:28:31 - 1.323 +++ changelog.xml 21 Jul 2005 04:12:33 - 1.324 @@ -211,6 +211,9 @@ add Apache Portable Runtime based AJP/1.3 protocol handler (remm) /add + fix +Delay reading the inital request body packet by default for the AJP/1.3 Java connector. (billbarker) + /fix /changelog /subsection @@ -236,6 +239,10 @@ fix bug34465/bug: Jspc failure if there is no web.xml (remm) /fix + fix +bug35696/bug: Make certain that release is called for custom tags + when tag-pooling is disabled. (billbarker) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java JkInputStream.java
billbarker2005/07/16 13:54:05 Modified:jk/java/org/apache/jk/common HandlerRequest.java JkInputStream.java Log: Copy the idea from the APR Connector, and delay reading the initial request body packet until the Servlet asks for it. This reduces the chance that the socket read will block uselessly waiting for the data to be available. You can restore the previous behavior by setting request.delayInitialRead=false on the Connector. Of course, if Bill R. decides to port his C-L patch for proxy_http to mod_jk, the value of this setting won't matter :). Revision ChangesPath 1.48 +28 -10 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- HandlerRequest.java 30 Jun 2005 02:49:38 - 1.47 +++ HandlerRequest.java 16 Jul 2005 20:54:05 - 1.48 @@ -168,6 +168,20 @@ return registerRequests; } +/** + * Set the flag to delay the initial body read + */ +public void setDelayInitialRead(boolean dir) { + delayInitialRead = dir; +} + +/** + * Get the flag to tell if we delay the initial body read + */ +public boolean getDelayInitialRead() { + return delayInitialRead; +} + // Ajp13.id private void generateAjp13Id() { @@ -210,14 +224,15 @@ } // Incoming message -String requiredSecret=null; -int secretNote; -int tmpBufNote; - -boolean decoded=true; -boolean tomcatAuthentication=true; -boolean registerRequests=true; -boolean shutdownEnabled=false; +private String requiredSecret=null; +private int secretNote; +private int tmpBufNote; + +private boolean decoded=true; +private boolean tomcatAuthentication=true; +private boolean registerRequests=true; +private boolean shutdownEnabled=false; +private boolean delayInitialRead = true; public int invoke(Msg msg, MsgContext ep ) throws IOException{ @@ -393,8 +408,11 @@ // immediately after int cl=req.getContentLength(); if(cl 0) { -// This is hidious. Look to remove it. -ep.getInputStream().receive(); +JkInputStream jkIS = ep.getInputStream(); +jkIS.setIsReadRequired(true); +if(!delayInitialRead) { +jkIS.receive(); +} } if (log.isTraceEnabled()) { 1.20 +26 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java Index: JkInputStream.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- JkInputStream.java30 Jun 2005 02:49:38 - 1.19 +++ JkInputStream.java16 Jul 2005 20:54:05 - 1.20 @@ -50,6 +50,7 @@ private boolean isEmpty = true; private boolean isFirst = true; private boolean isReplay = false; +private boolean isReadRequired = false; static { // Make certain HttpMessages is loaded for SecurityManager @@ -66,14 +67,39 @@ // Jk specific methods + +/** + * Set the flag saying that the server is sending a body + */ +public void setIsReadRequired(boolean irr) { +isReadRequired = irr; +} + +/** + * Return the flag saying that the server is sending a body + */ +public boolean isReadRequired() { +return isReadRequired; +} + /** Must be called before or after each request */ public void recycle() { +if(isReadRequired isFirst) { +// The Servlet never read the request body, so we need to junk it +try { + receive(); +} catch(IOException iex) { + log.debug(Error consuming request body,iex); +} +} + end_of_stream = false; isEmpty = true; isFirst = true; isReplay = false; +isReadRequired = false; bodyBuff.recycle(); tempMB.recycle(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
cvs commit: jakarta-tomcat-catalina/webapps/docs/config ajp.xml
billbarker2005/07/02 17:26:51 Modified:webapps/docs/config ajp.xml Log: Get rid of extra ^M characters. Revision ChangesPath 1.18 +2 -1 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml Index: ajp.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ajp.xml 4 Jun 2005 17:34:23 - 1.17 +++ ajp.xml 3 Jul 2005 00:26:51 - 1.18 @@ -193,7 +193,8 @@ attribute name=address required=false pFor servers with more than one IP address, this attribute specifies which address will be used for listening on the specified - port. By default, this port will be used on all IP addresses + port. By default, this pAuthenticating with public key rsa-key-20031223 +ort will be used on all IP addresses associated with the server. A value of code127.0.0.1/code indicates that the Connector will only listen on the loopback interface./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs/config ajp.xml
billbarker2005/07/02 17:31:53 Modified:webapps/docs changelog.xml webapps/docs/config ajp.xml Log: Doc changes. Revision ChangesPath 1.320 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.319 retrieving revision 1.320 diff -u -r1.319 -r1.320 --- changelog.xml 30 Jun 2005 13:08:14 - 1.319 +++ changelog.xml 3 Jul 2005 00:31:53 - 1.320 @@ -205,6 +205,9 @@ fix Fix connector initialisation so sslProtocol is not required for SSL. (markt) /fix + add +Add bufferSize option to the AJP/1.3 Java connector to control output buffering. (billbarker) + /add /changelog /subsection 1.19 +11 -5 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml Index: ajp.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ajp.xml 3 Jul 2005 00:26:51 - 1.18 +++ ajp.xml 3 Jul 2005 00:31:53 - 1.19 @@ -86,14 +86,14 @@ the container during FORM or CLIENT-CERT authentication. For both types of authentication, the POST will be saved/buffered before the user is authenticated. For CLIENT-CERT authentication, the POST is buffered for - the duration of the SSL handshake and the buffer emptied when the request - is processed. For FORM authentication the POST is saved whilst the user + the duration of the SSL handshake and the buffer emptied when the request + is processed. For FORM authentication the POST is saved whilst the user is re-directed to the login form and is retained until the user successfully authenticates or the session associated with the authentication request expires. The limit can be disabled by setting this - attribute to -1. Setting the attribute to zero will disable the saving of - POST data during authentication . If not specified, this attribute is set - to 4096 (4 kilobytes)./p + attribute to -1. Setting the attribute to zero will disable the saving of + POST data during authentication. If not specified, this attribute is set + to 4096 (4 kilobytes)./p /attribute attribute name=protocol required=false @@ -207,6 +207,12 @@ value is 10./p /attribute +attribute name=bufferSize required=false + pThe size of the output buffer to use. If less than or equal to zero, + then output buffering is disabled. The default value is -1 + (i.e. buffering disabled)/p +/attribute + attribute name=connectionTimeout required=false pThe number of milliseconds this strongConnector/strong will wait, after accepting a connection, for the request URI line to be - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs/config ajp.xml
billbarker2005/07/02 17:36:00 Modified:webapps/docs/config ajp.xml Log: Removing strange text that it seems comes from a CVS bug. It's probably time for me to upgrade :). Revision ChangesPath 1.20 +1 -2 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml Index: ajp.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ajp.xml 3 Jul 2005 00:31:53 - 1.19 +++ ajp.xml 3 Jul 2005 00:35:59 - 1.20 @@ -193,8 +193,7 @@ attribute name=address required=false pFor servers with more than one IP address, this attribute specifies which address will be used for listening on the specified - port. By default, this pAuthenticating with public key rsa-key-20031223 -ort will be used on all IP addresses + port. By default, this port will be used on all IP addresses associated with the server. A value of code127.0.0.1/code indicates that the Connector will only listen on the loopback interface./p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
billbarker2005/06/29 19:49:38 Modified:jk/java/org/apache/jk/common ChannelNioSocket.java ChannelSocket.java HandlerRequest.java JkInputStream.java jk/java/org/apache/jk/server JkMain.java Log: Optionally enable buffering on the output stream. With a 16K bufferSize, the APR connector is no longer the clear winner in performance. For BC, it's currently disabled by default, but it's easy enough to change that after some more testing. Revision ChangesPath 1.5 +28 -19 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java Index: ChannelNioSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ChannelNioSocket.java 15 May 2005 19:14:38 - 1.4 +++ ChannelNioSocket.java 30 Jun 2005 02:49:38 - 1.5 @@ -91,18 +91,19 @@ private static org.apache.commons.logging.Log log= org.apache.commons.logging.LogFactory.getLog( ChannelNioSocket.class ); -int startPort=8009; -int maxPort=8019; // 0 for backward compat. -int port=startPort; -InetAddress inet; -int serverTimeout = 0; -boolean tcpNoDelay=true; // nodelay to true by default -int linger=100; -int socketTimeout = 0; -boolean nioIsBroken = false; +private int startPort=8009; +private int maxPort=8019; // 0 for backward compat. +private int port=startPort; +private InetAddress inet; +private int serverTimeout = 0; +private boolean tcpNoDelay=true; // nodelay to true by default +private int linger=100; +private int socketTimeout = 0; +private boolean nioIsBroken = false; private Selector selector = null; +private int bufferSize = 8*1024; -long requestCount=0; +private long requestCount=0; /* Turning this to true will reduce the latency with about 20%. But it requires changes in tomcat to make sure client-requested @@ -152,6 +153,17 @@ this.inet=inet; } +public void setBufferSize(int bs) { +if(bs 8*1024) { +bufferSize = bs; +} +} + +public int getBufferSize() { +return bufferSize; +} + + /** * @jmx:managed-attribute description=Bind on a specified address access=READ_WRITE */ @@ -500,8 +512,7 @@ } public int send( Msg msg, MsgContext ep) -throws IOException -{ +throws IOException{ msg.end(); // Write the packet header byte buf[]=msg.getBuffer(); int len=msg.getLen(); @@ -511,19 +522,18 @@ OutputStream os=(OutputStream)ep.getNote( osNote ); os.write( buf, 0, len ); -os.flush(); return len; } public int flush( Msg msg, MsgContext ep) -throws IOException -{ +throws IOException{ +OutputStream os=(OutputStream)ep.getNote( osNote ); +os.flush(); return 0; } public int receive( Msg msg, MsgContext ep ) -throws IOException -{ +throws IOException{ if (log.isTraceEnabled()) { log.trace(receive() ); } @@ -1109,8 +1119,7 @@ } protected class SocketOutputStream extends OutputStream { -final int BUFFER_SIZE = 8200; -ByteBuffer buffer = ByteBuffer.allocateDirect(BUFFER_SIZE); +ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize); SocketChannel channel; SocketOutputStream(SocketChannel channel) { 1.56 +67 -67 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- ChannelSocket.java15 May 2005 19:14:38 - 1.55 +++ ChannelSocket.java30 Jun 2005 02:49:38 - 1.56 @@ -82,23 +82,17 @@ private static org.apache.commons.logging.Log log= org.apache.commons.logging.LogFactory.getLog( ChannelSocket.class ); -int startPort=8009; -int maxPort=8019; // 0 for backward compat. -int port=startPort; -InetAddress inet; -int serverTimeout; -boolean tcpNoDelay=true; // nodelay to true by default -int linger=100; -int socketTimeout; - -long requestCount=0; - -/* Turning this to true will reduce the latency with about 20
cvs commit: jakarta-tomcat-connectors/jk build.xml
billbarker2005/06/17 21:14:39 Modified:jk build.xml Log: Update to include the APR classes. This is mostly to get Remy's stuff in the Gump build. It likely to be a very long time before jakarta-tomcat-5's dependencies build, and hopefully by then I'll have modified the gumpy-build target to use the Gump jars instead of re-building. Doesn't effect the TC 5.5 build at all, the TC 3.3 patch is to follow, and AFAIK, those are the only versions using HEAD. Revision ChangesPath 1.82 +4 -0 jakarta-tomcat-connectors/jk/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- build.xml 16 Jun 2005 17:03:12 - 1.81 +++ build.xml 18 Jun 2005 04:14:39 - 1.82 @@ -28,6 +28,7 @@ property name=tomcat-jkshm.jar value=${jk.build}/lib/jkshm.jar / property name=tomcat-jk2.jar value=${jk.build}/lib/tomcat-jk2.jar / property name=tomcat-jni.jar value=${jk.build}/lib/tomcat-jni.jar / +property name=tomcat-apr.jar value=../jni/dist/tomcat-native-1.0.0.jar / !-- default locations, overrident by properties -- property name=base.path location=/usr/share/java/ @@ -202,12 +203,14 @@ optimize=${optimize} verbose=off include name=org/apache/jk/**/ +include name=org/apache/coyote/ajp/** / exclude name=org/apache/jk/common/JkMX.java unless=jmx.detect/ exclude name=org/apache/jk/common/ModJkMX.java unless=jmx.detect/ exclude name=org/apache/jk/common/Shm14.java unless=jdk14.detect/ exclude name=org/apache/jk/config/*Config.java / exclude name=org/apache/jk/ant/** / classpath +pathelement location=${tomcat-apr.jar} / path refid=xml-apis.classpath/ path refid=build-main.classpath/ /classpath @@ -223,6 +226,7 @@ manifest=conf/tomcat-jk2.manifest basedir=${jk.build}/classes include name=org/apache/jk/** / +include name=org/apache/coyote/ajp/** / exclude name=org/apache/jk/ant/** / /jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat build.xml
billbarker2005/06/17 21:16:57 Modified:.build.xml Log: Update to support building the APR connectors. This was actually badly broken before (like, for months :). It's nice to see that the TC 3.3 community is so active ;-). Revision ChangesPath 1.208 +7 -2 jakarta-tomcat/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.207 retrieving revision 1.208 diff -u -r1.207 -r1.208 --- build.xml 15 Apr 2005 03:17:08 - 1.207 +++ build.xml 18 Jun 2005 04:16:56 - 1.208 @@ -428,7 +428,7 @@ property name=version value=1.0.0 / /ant /target - target name=dep.tomcat-util unless=tomcat-util.is.uptodate + target name=dep.tomcat-util unless=tomcat-util.is.uptodate depends=dep.tomcat-jni description=Build j-t-c util which we depend on. To be called before main ant dir=${jtc.util.home} / @@ -448,9 +448,13 @@ property name=tomcat-jni.jar value=${tomcat-jni.jar} / /ant -ant dir=${jtc.jk.home} target=build-jk +ant dir=${jtc.jk.home} target=build-jk inheritAll=false property name=tomcat33.home value=${tomcat.build}/ property name=servlet-api.jar value=${basedir}/${servlet22.jar}/ +property name=tomcat-apr.jar value=${tomcat-jni.jar} / +property name=jmx.jar value=${jmx.jar} / +property name=commons-modeler.jar value=${commons-modeler.jar} / +property name=commons-logging.jar value=${commons-logging.jar} / /ant /target @@ -1236,6 +1240,7 @@ ant dir=${jakarta-tomcat-connectors}/coyote target=clean / ant dir=${jakarta-tomcat-connectors}/http11 target=clean / ant dir=${jakarta-tomcat-connectors}/jk target=clean / +ant dir=${jakarta-tomcat-connectors}/jni target=clean / /target target name=all depends=clean,dist/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationDispatcher.java
billbarker2005/06/08 22:50:27 Modified:catalina/src/share/org/apache/catalina/core ApplicationDispatcher.java Log: Set the path elements after setting the Request attributes. The 'hrequest' wraps the 'wrequest' in most (non-trivial, where it doesn't matter) cases, so if the Wrapper doesn't override the path-element methods, previously we got the wrong attribute values. If the Wrapper does override the path-element methods, than this is no more broken than before. Fix for Bug #35270. Revision ChangesPath 1.44 +5 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java Index: ApplicationDispatcher.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- ApplicationDispatcher.java6 Feb 2005 10:39:32 - 1.43 +++ ApplicationDispatcher.java9 Jun 2005 05:50:26 - 1.44 @@ -372,10 +372,6 @@ ApplicationHttpRequest wrequest = (ApplicationHttpRequest) wrapRequest(); String contextPath = context.getPath(); -wrequest.setContextPath(contextPath); -wrequest.setRequestURI(requestURI); -wrequest.setServletPath(servletPath); -wrequest.setPathInfo(pathInfo); if (hrequest.getAttribute(Globals.FORWARD_REQUEST_URI_ATTR) == null) { wrequest.setAttribute(Globals.FORWARD_REQUEST_URI_ATTR, @@ -390,6 +386,10 @@ hrequest.getQueryString()); } +wrequest.setContextPath(contextPath); +wrequest.setRequestURI(requestURI); +wrequest.setServletPath(servletPath); +wrequest.setPathInfo(pathInfo); if (queryString != null) { wrequest.setQueryString(queryString); wrequest.setQueryParams(queryString); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Connector.java Response.java
billbarker2005/05/20 20:02:25 Modified:catalina/src/share/org/apache/catalina/connector Connector.java Response.java Log: Reverting previous patch in favor of the better one submitted by JFC Revision ChangesPath 1.20 +1 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java Index: Connector.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Connector.java20 May 2005 06:14:36 - 1.19 +++ Connector.java21 May 2005 03:02:25 - 1.20 @@ -899,10 +899,6 @@ Response response = new Response(); response.setConnector(this); -if(AJP/1.3.equals(getProtocol())) { -// we can't shrink it, so set to 2*max-ajp-packet-size -response.setBufferSize(2*8184); -} return (response); } 1.13 +12 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Response.java Index: Response.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Response.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Response.java 25 Apr 2005 22:06:30 - 1.12 +++ Response.java 21 May 2005 03:02:25 - 1.13 @@ -125,6 +125,14 @@ */ public void setConnector(Connector connector) { this.connector = connector; +if(AJP/1.3.equals(connector.getProtocol())) { +// default size to size of one ajp-packet +outputBuffer = new OutputBuffer(8184); +} else { +outputBuffer = new OutputBuffer(); +} +outputStream = new CoyoteOutputStream(outputBuffer); +writer = new CoyoteWriter(outputBuffer); } @@ -174,20 +182,19 @@ /** * The associated output buffer. */ -protected OutputBuffer outputBuffer = new OutputBuffer(); +protected OutputBuffer outputBuffer; /** * The associated output stream. */ -protected CoyoteOutputStream outputStream = -new CoyoteOutputStream(outputBuffer); +protected CoyoteOutputStream outputStream; /** * The associated writer. */ -protected CoyoteWriter writer = new CoyoteWriter(outputBuffer); +protected CoyoteWriter writer; /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java
billbarker2005/05/19 22:52:02 Modified:jk/java/org/apache/jk/common HandlerRequest.java JkInputStream.java jk/java/org/apache/jk/core MsgContext.java jk/java/org/apache/jk/server JkCoyoteHandler.java Log: Implement the BODY_REPLAY Action for Form auth. Revision ChangesPath 1.46 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- HandlerRequest.java 15 May 2005 19:14:38 - 1.45 +++ HandlerRequest.java 20 May 2005 05:52:02 - 1.46 @@ -329,7 +329,7 @@ static int count = 0; private Request checkRequest(MsgContext ep) { -Request req=(Request)ep.getRequest(); +Request req=ep.getRequest(); if( req==null ) { req=new Request(); Response res=new Response(); 1.18 +16 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java Index: JkInputStream.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkInputStream.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- JkInputStream.java15 May 2005 19:14:38 - 1.17 +++ JkInputStream.java20 May 2005 05:52:02 - 1.18 @@ -49,6 +49,7 @@ private boolean end_of_stream=false; private boolean isEmpty = true; private boolean isFirst = true; +private boolean isReplay = false; static { // Make certain HttpMessages is loaded for SecurityManager @@ -72,6 +73,7 @@ end_of_stream = false; isEmpty = true; isFirst = true; +isReplay = false; bodyBuff.recycle(); tempMB.recycle(); } @@ -194,6 +196,9 @@ { // If the server returns an empty packet, assume that that end of // the stream has been reached (yuck -- fix protocol??). +if(isReplay) { +end_of_stream = true; // we've read everything there is +} if (end_of_stream) { if( log.isDebugEnabled() ) log.debug(refillReadBuffer: end of stream ); @@ -271,4 +276,15 @@ mc.getSource().send( outputMsg, mc ); } +/** + * Set the replay buffer for Form auth + */ +public void setReplay(ByteChunk replay) { +isFirst = false; +isEmpty = false; +isReplay = true; +bodyBuff.setBytes(replay.getBytes(), replay.getStart(), replay.getLength()); +} + + } 1.12 +6 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/core/MsgContext.java Index: MsgContext.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/MsgContext.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- MsgContext.java 15 May 2005 19:14:38 - 1.11 +++ MsgContext.java 20 May 2005 05:52:02 - 1.12 @@ -156,7 +156,7 @@ res.setHook(this); } -public final Object getRequest() { +public final Request getRequest() { return req; } @@ -348,6 +348,11 @@ } else if( actionCode==ActionCode.ACTION_ACK ) { if( log.isTraceEnabled() ) log.trace(ACK ); +} else if ( actionCode == ActionCode.ACTION_REQ_SET_BODY_REPLAY ) { +if( log.isTraceEnabled() ) +log.trace(Replay ); +ByteChunk bc = (ByteChunk)param; +jkIS.setReplay(bc); } } 1.63 +3 -4 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java Index: JkCoyoteHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- JkCoyoteHandler.java 15 May 2005 19:14:38 - 1.62 +++ JkCoyoteHandler.java 20 May 2005 05:52:02 - 1.63 @@ -181,13 +181,12 @@ // Jk handler implementation // Jk Handler mehod public int invoke( Msg msg, MsgContext ep ) -throws IOException -{ +throws IOException { if( ep.isLogTimeEnabled() ) ep.setLong( MsgContext.TIMER_PRE_REQUEST
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common Shm.java WorkerDummy.java
billbarker2005/05/15 13:16:32 Modified:jk/java/org/apache/jk/common Shm.java WorkerDummy.java Log: Oops missed a couple of files. Revision ChangesPath 1.16 +3 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java Index: Shm.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Shm.java 17 Sep 2004 18:34:18 - 1.15 +++ Shm.java 15 May 2005 20:16:32 - 1.16 @@ -160,7 +160,7 @@ if( apr==null ) return; MsgContext mCtx=createMsgContext(); Msg msg=(Msg)mCtx.getMsg(0); -C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE); +C2BConverter c2b=mCtx.getConverter(); msg.reset(); msg.appendByte( SHM_DUMP ); @@ -182,7 +182,7 @@ MsgContext mCtx=createMsgContext(); Msg msg=(Msg)mCtx.getMsg(0); msg.reset(); -C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE); +C2BConverter c2b=mCtx.getConverter(); msg.appendByte( SHM_WRITE_SLOT ); appendString( msg, slotName, c2b ); @@ -225,7 +225,7 @@ MsgContext mCtx=createMsgContext(); Msg msg=(Msg)mCtx.getMsg(0); msg.reset(); -C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE); +C2BConverter c2b=mCtx.getConverter(); msg.appendByte( SHM_WRITE_SLOT ); appendString( msg, slotName, c2b ); 1.11 +3 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java Index: WorkerDummy.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- WorkerDummy.java 11 Jan 2005 13:37:46 - 1.10 +++ WorkerDummy.java 15 May 2005 20:16:32 - 1.11 @@ -59,7 +59,7 @@ } msg.reset(); -msg.appendByte(HandlerRequest.JK_AJP13_SEND_HEADERS); +msg.appendByte(AjpConstants.JK_AJP13_SEND_HEADERS); msg.appendInt(200); msg.appendBytes(null); @@ -70,7 +70,7 @@ // msg.dump(out: ); msg.reset(); -msg.appendByte( HandlerRequest.JK_AJP13_SEND_BODY_CHUNK); +msg.appendByte( AjpConstants.JK_AJP13_SEND_BODY_CHUNK); msg.appendInt( body.getLength() ); msg.appendBytes( body ); @@ -78,7 +78,7 @@ ep.getSource().invoke(msg, ep); msg.reset(); -msg.appendByte( HandlerRequest.JK_AJP13_END_RESPONSE ); +msg.appendByte( AjpConstants.JK_AJP13_END_RESPONSE ); msg.appendInt( 1 ); ep.getSource().invoke(msg, ep ); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/05/15 15:21:56 Modified:webapps/docs changelog.xml Log: doc changes to AJP/1.3 Connector Revision ChangesPath 1.310 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.309 retrieving revision 1.310 diff -u -r1.309 -r1.310 --- changelog.xml 13 May 2005 07:12:24 - 1.309 +++ changelog.xml 15 May 2005 22:21:55 - 1.310 @@ -181,6 +181,9 @@ add bug34648/bug: Add configuration option to enable IP-based Virtual Hosts. (billbarker) /add + update +Refactor the AJP/1.3 Connector to be able to handle more advanced Actions. (billbarker) + /update /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote ActionCode.java
billbarker2005/05/15 21:58:00 Modified:coyote/src/java/org/apache/coyote ActionCode.java Log: Add action code for FORM replay Revision ChangesPath 1.17 +7 -0 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java Index: ActionCode.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/ActionCode.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ActionCode.java 24 Feb 2004 08:54:29 - 1.16 +++ ActionCode.java 16 May 2005 04:58:00 - 1.17 @@ -118,6 +118,13 @@ **/ public static final ActionCode ACTION_REQ_LOCAL_NAME_ATTRIBUTE = new ActionCode(19); + +/** + * Callback for setting FORM auth body replay + */ +public static final ActionCode ACTION_REQ_SET_BODY_REPLAY = new ActionCode(20); + + // --- Constructors int code; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java
billbarker2005/05/15 22:12:50 Modified:catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java Log: Give Fuhrer Remy a clean build, even if as yet no Connector supports this particular ActionCode. Revision ChangesPath 1.21 +3 -11 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java Index: FormAuthenticator.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- FormAuthenticator.java11 May 2005 21:39:41 - 1.20 +++ FormAuthenticator.java16 May 2005 05:12:50 - 1.21 @@ -37,8 +37,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.coyote.InputBuffer; -import org.apache.coyote.http11.InputFilter; -import org.apache.coyote.http11.InternalInputBuffer; +import org.apache.coyote.ActionCode; import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.buf.CharChunk; import org.apache.tomcat.util.buf.MessageBytes; @@ -389,14 +388,7 @@ if (POST.equalsIgnoreCase(saved.getMethod())) { ByteChunk body = saved.getBody(); -// Set content length -request.getCoyoteRequest().setContentLength(body.getLength()); - -// Restore body -InputFilter savedBody = new SavedRequestInputFilter(body); -InternalInputBuffer internalBuffer = (InternalInputBuffer) -request.getCoyoteRequest().getInputBuffer(); -internalBuffer.addActiveFilter(savedBody); + request.action(ActionCode.ACTION_REQ_SET_BODY_REPLAY, body); // Set content type MessageBytes contentType = MessageBytes.newInstance(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java
billbarker2005/05/15 22:22:21 Modified:catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java Log: Oops, missed an indirection Revision ChangesPath 1.22 +2 -33 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java Index: FormAuthenticator.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- FormAuthenticator.java16 May 2005 05:12:50 - 1.21 +++ FormAuthenticator.java16 May 2005 05:22:21 - 1.22 @@ -388,7 +388,7 @@ if (POST.equalsIgnoreCase(saved.getMethod())) { ByteChunk body = saved.getBody(); - request.action(ActionCode.ACTION_REQ_SET_BODY_REPLAY, body); + request.getCoyoteRequest().action(ActionCode.ACTION_REQ_SET_BODY_REPLAY, body); // Set content type MessageBytes contentType = MessageBytes.newInstance(); @@ -485,36 +485,5 @@ } -protected class SavedRequestInputFilter implements InputFilter { - -protected ByteChunk input = null; - -public SavedRequestInputFilter(ByteChunk input) { -this.input = input; -} - -public int doRead(ByteChunk chunk, org.apache.coyote.Request request) -throws IOException { -return input.substract(chunk); -} - - public void setRequest(org.apache.coyote.Request request) { - } - - public void recycle() { -input = null; - } - - public ByteChunk getEncodingName() { - return null; - } - - public void setBuffer(InputBuffer buffer) { - } - - public long end() throws IOException { - return 0; - } -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelNioSocket.java
billbarker2005/05/13 20:27:19 Modified:jk/java/org/apache/jk/common ChannelNioSocket.java Log: Checking in some stuff I've had here, before I start to fix Jk-Coyote so that it has a hope of working with Mark's patch. Now this uses direct ByteBuffers (makes a big difference :). Added a nioIsBroken flag, which if true seems to work around the NIO bugs in the Windows implementation. Solaris performance is actually pretty close to ChannelSocket now. Windows is really slow. Of course, it would need a lot more testing on more platforms before I'm willing to lift the 'experimental' label (and I still haven't found a case where it's better than ChannelSocket :). Revision ChangesPath 1.3 +164 -91 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java Index: ChannelNioSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChannelNioSocket.java 24 Apr 2005 04:27:42 - 1.2 +++ ChannelNioSocket.java 14 May 2005 03:27:19 - 1.3 @@ -99,6 +99,7 @@ boolean tcpNoDelay=true; // nodelay to true by default int linger=100; int socketTimeout = 0; +boolean nioIsBroken = false; private Selector selector = null; long requestCount=0; @@ -241,15 +242,15 @@ tp.setMaxThreads(i); } -public void setMinSpareThreads( int i ) { +public void setMinSpareThreads( int i ) { if( log.isDebugEnabled()) log.debug(Setting minSpareThreads + i); -tp.setMinSpareThreads(i); -} +tp.setMinSpareThreads(i); +} -public void setMaxSpareThreads( int i ) { +public void setMaxSpareThreads( int i ) { if( log.isDebugEnabled()) log.debug(Setting maxSpareThreads + i); -tp.setMaxSpareThreads(i); -} +tp.setMaxSpareThreads(i); +} public int getMaxThreads() { return tp.getMaxThreads(); @@ -266,6 +267,13 @@ public void setBacklog(int i) { } +public void setNioIsBroken(boolean nib) { +nioIsBroken = nib; +} + +public boolean getNioIsBroken() { +return nioIsBroken; +} /* */ ServerSocket sSocket; @@ -278,7 +286,6 @@ public void pause() throws Exception { synchronized(this) { paused = true; -//unLockSocket(); } } @@ -501,17 +508,6 @@ if(log.isTraceEnabled() ) log.trace(send() + len + + buf[4] ); -if(buf[4] == HandlerRequest.JK_AJP13_END_RESPONSE ) { -// After this goes out, the client may send a new request -// before the thread finishes, so tell the Poller that the -// next read is new -Socket s = (Socket)ep.getNote(socketNote); -SelectionKey key = s.getChannel().keyFor(selector); -if(key != null) { -SocketConnection sc = (SocketConnection)key.attachment(); -sc.setFinished(); -} -} OutputStream os=(OutputStream)ep.getNote( osNote ); os.write( buf, 0, len ); @@ -528,8 +524,8 @@ public int receive( Msg msg, MsgContext ep ) throws IOException { -if (log.isDebugEnabled()) { -log.debug(receive() ); +if (log.isTraceEnabled()) { +log.trace(receive() ); } byte buf[]=msg.getBuffer(); @@ -636,8 +632,6 @@ /** Accept incoming connections, dispatch to the thread pool */ void acceptConnections() { -if( log.isDebugEnabled() ) -log.debug(Accepting ajp connections on + port); if( running ) { try{ MsgContext ep=new MsgContext(); @@ -674,8 +668,8 @@ return flush( msg, ep ); } -if( log.isDebugEnabled() ) -log.debug(Call next + type + + next); +if( log.isTraceEnabled() ) +log.trace(Call next + type + + next); // Send notification if( nSupport!=null ) { @@ -788,7 +782,6 @@ this.ep=ep; } - public Object[] getInitData() { return null; } @@ -797,14 +790,13 @@ if(!processConnection(ep)) { unregister(ep); } -setFinished(); } public boolean isRunning() { return inProgress; } -public synchronized void setFinished() { +public
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardPipeline.java
billbarker2005/05/08 15:16:47 Modified:catalina/src/share/org/apache/catalina/core StandardPipeline.java Log: Fix problem where the first Valve wasn't removed from the Pipeline. Of course, this can only happen when running Tomcat as Embedded, or with advanced JMX management scenarios. Fix for Bug #34546 Reported By: Christian Betz [EMAIL PROTECTED] Revision ChangesPath 1.23 +7 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardPipeline.java Index: StandardPipeline.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- StandardPipeline.java 23 Jun 2004 16:59:41 - 1.22 +++ StandardPipeline.java 8 May 2005 22:16:47 - 1.23 @@ -515,7 +515,13 @@ */ public void removeValve(Valve valve) { -Valve current = first; +Valve current; +if(first == valve) { +first = first.getNext(); +current = null; +} else { +current = first; +} while (current != null) { if (current.getNext() == valve) { current.setNext(valve.getNext()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/05/08 15:31:33 Modified:webapps/docs changelog.xml Log: document change Revision ChangesPath 1.305 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.304 retrieving revision 1.305 diff -u -r1.304 -r1.305 --- changelog.xml 5 May 2005 16:27:30 - 1.304 +++ changelog.xml 8 May 2005 22:31:33 - 1.305 @@ -142,6 +142,9 @@ update bug34675/bug: Updated Proxy-HowTo page with Servlet API calls. (yoavs) /update + fix +bug34546/bug: Fix problem where the first Valve couldn't be removed from a Pipeline. (billbarker) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/05/01 17:05:03 Modified:webapps/docs changelog.xml Log: Catching up on my changes, before I forget all of them. Revision ChangesPath 1.299 +6 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.298 retrieving revision 1.299 diff -u -r1.298 -r1.299 --- changelog.xml 30 Apr 2005 17:20:50 - 1.298 +++ changelog.xml 2 May 2005 00:05:02 - 1.299 @@ -143,6 +143,12 @@ provides efficient worker thread usage (remm) /add add +Add support for simple file-based CRLs under JDK 1.5 (billbarker) + /add + add +Add experimental NIO-Socket channel for the AJP/1.3 Connector (billbarker) + /add + add bug34648/bug: Add configuration option to enable IP-based Virtual Hosts. (billbarker) /add /changelog - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Connector.java CoyoteAdapter.java
billbarker2005/04/29 20:32:43 Modified:catalina/src/share/org/apache/catalina/connector Connector.java CoyoteAdapter.java Log: Add option to enable IP-based Virtual Hosting. Fix for bug #34648 Revision ChangesPath 1.18 +22 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java Index: Connector.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Connector.java28 Apr 2005 12:29:51 - 1.17 +++ Connector.java30 Apr 2005 03:32:43 - 1.18 @@ -208,6 +208,10 @@ */ protected boolean stopped = false; +/** + * Flag to use IP-based virtual hosting. + */ +protected boolean useIPVHosts = false; /** * The background thread. @@ -853,6 +857,23 @@ setProperty(xpoweredBy, String.valueOf(xpoweredBy)); } +/** + * Enable the use of IP-based virtual hosting. + * + * @param useIPVHosts codetrue/code if Hosts are identified by IP, + *codefalse/code if Hosts are identified by name. + */ +public void setUseIPVHosts(boolean useIPVHosts) { +this.useIPVHosts = useIPVHosts; +setProperty(useIPVHosts, String.valueOf(useIPVHosts)); +} + +/** + * Test if IP-based virtual hosting is enabled. + */ +public boolean getUseIPVHosts() { +return useIPVHosts; +} // - Public Methods 1.9 +12 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java Index: CoyoteAdapter.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- CoyoteAdapter.java27 Oct 2004 22:58:17 - 1.8 +++ CoyoteAdapter.java30 Apr 2005 03:32:43 - 1.9 @@ -259,7 +259,17 @@ } // Request mapping. -connector.getMapper().map(req.serverName(), decodedURI, +MessageBytes serverName; +if(connector.getUseIPVHosts()) { +serverName = req.localName(); +if(serverName.isNull()) { +// well, they did ask for it +res.action(ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, null); +} +} else { +serverName = req.serverName(); +} +connector.getMapper().map(serverName, decodedURI, request.getMappingData()); request.setContext((Context) request.getMappingData().context); request.setWrapper((Wrapper) request.getMappingData().wrapper); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs/config ajp.xml http.xml
billbarker2005/04/29 21:35:37 Modified:webapps/docs changelog.xml webapps/docs/config ajp.xml http.xml Log: Update docs to include new Virtual Host option. Revision ChangesPath 1.296 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.295 retrieving revision 1.296 diff -u -r1.295 -r1.296 --- changelog.xml 29 Apr 2005 17:18:21 - 1.295 +++ changelog.xml 30 Apr 2005 04:35:37 - 1.296 @@ -136,6 +136,9 @@ Add Apache Portable Runtime based HTTP/1.1 protocol handler, without SSL support, which provides efficient worker thread usage (remm) /add + add +bug34648/bug: Add configuration option to enable IP-based Virtual Hosts. (billbarker) + /add /changelog /subsection 1.14 +6 -0 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml Index: ajp.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ajp.xml 6 Apr 2005 15:54:05 - 1.13 +++ ajp.xml 30 Apr 2005 04:35:37 - 1.14 @@ -147,6 +147,12 @@ /p /attribute +attribute name=useIPVHosts required=false + pSet this attribute to codetrue/code to cause Tomcat to use + the ServerName passed by the native web server to determine the Host + to send the request to. The default value is codefalse/code./p +/attribute + attribute name=xpoweredBy required=false pSet this attribute to codetrue/code to cause Tomcat to advertise support for the Srevlet specification using the header recommended in the 1.22 +6 -0 jakarta-tomcat-catalina/webapps/docs/config/http.xml Index: http.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/http.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- http.xml 6 Apr 2005 15:54:05 - 1.21 +++ http.xml 30 Apr 2005 04:35:37 - 1.22 @@ -146,6 +146,12 @@ /p /attribute +attribute name=useIPVHosts required=false + pSet this attribute to codetrue/code to cause Tomcat to use + the IP address that the request was recieved on to determine the Host + to send the request to. The default value is codefalse/code./p +/attribute + attribute name=xpoweredBy required=false pSet this attribute to codetrue/code to cause Tomcat to advertise support for the Srevlet specification using the header recommended in the - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelNioSocket.java
billbarker2005/04/23 21:27:42 Modified:jk/java/org/apache/jk/common ChannelNioSocket.java Log: Give up on switching between blocking/non-blocking Sockets, also move the Accecpt into the Poller instead of its own thread. This is still very much experimental, and nobody should even dream of using it in production. Testing on Windows, it's very flakey. On Solaris, it's stable enough, but ChannelSocket is about 25% faster. Revision ChangesPath 1.2 +231 -80 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java Index: ChannelNioSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ChannelNioSocket.java 17 Apr 2005 03:41:08 - 1.1 +++ ChannelNioSocket.java 24 Apr 2005 04:27:42 - 1.2 @@ -18,19 +18,22 @@ import java.util.Set; import java.util.Iterator; -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.ByteBuffer; import java.nio.channels.Selector; import java.nio.channels.SelectionKey; +import java.nio.channels.SocketChannel; import java.nio.channels.ClosedSelectorException; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.CancelledKeyException; +import java.nio.channels.ClosedChannelException; import java.net.URLEncoder; import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; -import java.net.SocketException; import javax.management.ListenerNotFoundException; import javax.management.MBeanNotificationInfo; @@ -92,10 +95,10 @@ int maxPort=8019; // 0 for backward compat. int port=startPort; InetAddress inet; -int serverTimeout; +int serverTimeout = 0; boolean tcpNoDelay=true; // nodelay to true by default int linger=100; -int socketTimeout; +int socketTimeout = 0; private Selector selector = null; long requestCount=0; @@ -105,7 +108,6 @@ flush() is honored ( on my test, I got 367-433 RPS and 52-35ms average time with a simple servlet ) */ -static final boolean BUFFER_WRITE=false; ThreadPool tp=ThreadPool.createThreadPool(true); @@ -271,12 +273,12 @@ final int isNote=2; final int osNote=3; final int notifNote=4; -boolean paused = true; +boolean paused = false; public void pause() throws Exception { synchronized(this) { paused = true; -unLockSocket(); +//unLockSocket(); } } @@ -299,10 +301,11 @@ } } } -Socket s=sSocket.accept(); +SocketChannel sc=sSocket.getChannel().accept(); +Socket s = sc.socket(); ep.setNote( socketNote, s ); if(log.isDebugEnabled() ) -log.debug(Accepted socket + s ); +log.debug(Accepted socket + s + channel + sc.isBlocking()); if( linger 0 ) s.setSoLinger( true, linger); if( socketTimeout 0 ) @@ -312,12 +315,9 @@ requestCount++; -InputStream is=new BufferedInputStream(s.getInputStream()); -OutputStream os; -if( BUFFER_WRITE ) -os = new BufferedOutputStream( s.getOutputStream()); -else -os = s.getOutputStream(); +sc.configureBlocking(false); +InputStream is=new SocketInputStream(sc); +OutputStream os = new SocketOutputStream(sc); ep.setNote( isNote, is ); ep.setNote( osNote, os ); ep.setControl( tp ); @@ -349,19 +349,24 @@ } if (maxPort startPort) maxPort = startPort; +ServerSocketChannel ssc = ServerSocketChannel.open(); +ssc.configureBlocking(false); for( int i=startPort; i=maxPort; i++ ) { try { +InetSocketAddress iddr = null; if( inet == null ) { -sSocket = new ServerSocket( i, 0 ); +iddr = new InetSocketAddress( i); } else { -sSocket=new ServerSocket( i, 0, inet ); +iddr=new InetSocketAddress( inet, i); } +sSocket = ssc.socket(); +sSocket.bind(iddr); port=i; break; } catch( IOException ex ) { if(log.isInfoEnabled()) log.info(Port busy + i + + ex.toString
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
billbarker2005/04/16 20:41:08 Modified:jk/java/org/apache/jk/common ChannelSocket.java jk/java/org/apache/jk/server JkMain.java Added: jk/java/org/apache/jk/common ChannelNioSocket.java Log: Give Remy something meaningful to benchmark against ;-). On certain (unnamed) broken OSs, it is expensive to have hundreds of threads blocking on reads. Using ChannelNioSocket instead of ChannelSocket means that all active threads are processing requests, so fewer threads are needed. If using a non-broken OS, ChannelNioSocket is probably slower than ChannelSocket. It also has extra GC vs Remy's ChannelAprSocket. Revision ChangesPath 1.54 +2 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- ChannelSocket.java24 Mar 2005 15:31:16 - 1.53 +++ ChannelSocket.java17 Apr 2005 03:41:08 - 1.54 @@ -457,6 +457,8 @@ Socket s; InetAddress ladr = inet; +if(port == 0) +return; if (ladr == null || 0.0.0.0.equals(ladr.getHostAddress())) { ladr = InetAddress.getLocalHost(); } 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelNioSocket.java Index: ChannelNioSocket.java === /* * Copyright 1999-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jk.common; import java.util.Set; import java.util.Iterator; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.channels.Selector; import java.nio.channels.SelectionKey; import java.nio.channels.ClosedSelectorException; import java.net.URLEncoder; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketException; import javax.management.ListenerNotFoundException; import javax.management.MBeanNotificationInfo; import javax.management.Notification; import javax.management.NotificationBroadcaster; import javax.management.NotificationBroadcasterSupport; import javax.management.NotificationFilter; import javax.management.NotificationListener; import javax.management.ObjectName; import org.apache.commons.modeler.Registry; import org.apache.jk.core.JkHandler; import org.apache.jk.core.Msg; import org.apache.jk.core.MsgContext; import org.apache.jk.core.JkChannel; import org.apache.jk.core.WorkerEnv; import org.apache.coyote.Request; import org.apache.coyote.RequestGroupInfo; import org.apache.coyote.RequestInfo; import org.apache.tomcat.util.threads.ThreadPool; import org.apache.tomcat.util.threads.ThreadPoolRunnable; /* XXX Make the 'message type' pluggable */ /* A lot of the 'original' behavior is hardcoded - this uses Ajp13 wire protocol, TCP, Ajp14 API etc. As we add other protocols/transports/APIs this will change, the current goal is to get the same level of functionality as in the original jk connector. */ /** * Jk can use multiple protocols/transports. * Various container adapters should load this object ( as a bean ), * set configurations and use it. Note that the connector will handle * all incoming protocols - it's not specific to ajp1x. The protocol * is abstracted by MsgContext/Message/Channel. */ /** Accept ( and send ) TCP messages. * * @author Costin Manolache * @author Bill Barker * @jmx:mbean name=jk:service=ChannelNioSocket *description=Accept socket connections * @jmx:notification name=org.apache.coyote.INVOKE * @jmx:notification-handler name=org.apache.jk.JK_SEND_PACKET * @jmx:notification-handler name=org.apache.jk.JK_RECEIVE_PACKET * @jmx:notification-handler name=org.apache.jk.JK_FLUSH */ public class ChannelNioSocket extends JkHandler implements NotificationBroadcaster, JkChannel { private static
cvs commit: jakarta-tomcat-connectors/util build.xml
billbarker2005/04/14 19:49:14 Modified:util build.xml Log: Add tomcat-jni.jar to the classpath, since it is now required. Revision ChangesPath 1.32 +2 -1 jakarta-tomcat-connectors/util/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/util/build.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- build.xml 10 Apr 2005 22:19:00 - 1.31 +++ build.xml 15 Apr 2005 02:49:14 - 1.32 @@ -23,7 +23,7 @@ property name=tomcat-util.lib value=${tomcat-util.build}/lib / property name=tomcat-util.jar value=${tomcat-util.lib}/tomcat-util.jar / property name=tomcat-loader.jar value=${tomcat-util.lib}/tomcat-loader.jar / - +property name=tomcat-jni.jar value=../jni/dist/tomcat-native-1.0.0.jar / path id=compile.classpath pathelement location=${jmx.jar} / @@ -34,6 +34,7 @@ pathelement location=${puretls.jar} / pathelement location=${commons-logging.jar} / pathelement location=${commons-modeler.jar} / +pathelement location=${tomcat-jni.jar} / /path target name=detect - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/http11 build.xml
billbarker2005/04/14 20:10:02 Modified:http11 build.xml Log: Adding tomcat-jni.jar to the classpath, since it is now required. Revision ChangesPath 1.18 +3 -1 jakarta-tomcat-connectors/http11/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/build.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- build.xml 10 Mar 2004 22:35:10 - 1.17 +++ build.xml 15 Apr 2005 03:10:02 - 1.18 @@ -31,6 +31,7 @@ !-- The locations of necessary jar files -- property name=tomcat-util.jar value=${util.home}/build/lib/tomcat-util.jar/ + property name=tomcat-jni.jar value=../jni/dist/tomcat-native-1.0.0.jar / property name=tomcat-coyote.jar value=${coyote.home}/build/lib/tomcat-coyote.jar/ property name=tomcat33-coyote.jar value=${coyote.home}/build/lib/tomcat33-coyote.jar/ @@ -85,6 +86,7 @@ pathelement location=${commons-modeler.jar}/ pathelement location=${regexp.jar}/ pathelement location=${jmx.jar}/ +pathelement location=${tomcat-jni.jar} / /path - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat build.xml
billbarker2005/04/14 20:17:08 Modified:.build.xml Log: Get 3.3 building again with j-t-c/jni. Revision ChangesPath 1.207 +14 -0 jakarta-tomcat/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.206 retrieving revision 1.207 diff -u -r1.206 -r1.207 --- build.xml 19 Nov 2004 08:15:53 - 1.206 +++ build.xml 15 Apr 2005 03:17:08 - 1.207 @@ -85,6 +85,9 @@ property name=tomcat-jk.home location=${jakarta-tomcat-connectors}/jk / property name=jtc.util.home location=${jakarta-tomcat-connectors}/util/ + property name=jtc.jni.home location=${jakarta-tomcat-connectors}/jni / + property name=tomcat-jni.jar +location=${jtc.jni.home}/dist/tomcat-native-1.0.0.jar / property name=jtc.util.build location=${jtc.util.home}/build/ property name=tomcat-util.jar location=${jtc.util.build}/lib/tomcat-util.jar/ @@ -241,6 +244,9 @@ uptodate property=tomcat-util.is.uptodate targetfile=${tomcat-util.jar} srcfiles dir=${jtc.util.home} includes=java/**,build.xml/ /uptodate +uptodate property=tomcat-jni.is.uptodate targetfile=${tomcat-jni.jar} + srcfiles dir=${jtc.jni.home} includes=java/**,build.xml/ +/uptodate /target target name=msg.ant15 if=ant15-present @@ -416,7 +422,14 @@ /move /target + target name=dep.tomcat-jni unless=tomcat-jni.is.uptodate + description=Build j-t-c jni which j-t-c util depends on. + ant dir=${jtc.jni.home} target=jar + property name=version value=1.0.0 / + /ant + /target target name=dep.tomcat-util unless=tomcat-util.is.uptodate + depends=dep.tomcat-jni description=Build j-t-c util which we depend on. To be called before main ant dir=${jtc.util.home} / /target @@ -432,6 +445,7 @@ property name=commons-logging.jar value=${commons-logging.jar}/ property name=commons-modeler.jar value=${commons-modeler.jar}/ property name=jmx.jar value=${jmx.jar}/ +property name=tomcat-jni.jar value=${tomcat-jni.jar} / /ant ant dir=${jtc.jk.home} target=build-jk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util build.xml
billbarker2005/04/10 15:19:00 Modified:util build.xml Log: Add checks for JDK 1.5. Revision ChangesPath 1.31 +3 -0 jakarta-tomcat-connectors/util/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/util/build.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- build.xml 6 Oct 2004 15:41:44 - 1.30 +++ build.xml 10 Apr 2005 22:19:00 - 1.31 @@ -43,6 +43,7 @@ available property=commons-logging.present file=${commons-logging.jar}/ available property=modeler.present file=${commons-modeler.jar}/ available property=jdk1.4.present classname=java.lang.CharSequence / +available property=jdk1.5.present classname=javax.net.ssl.CertPathTrustManagerParameters / /target target name=build-prepare depends=detect @@ -61,6 +62,7 @@ echo message=-- jmx = ${jmx.present} ${jmx.jar}/ echo message=-- modeler = ${modeler.present} ${commons-modeler.jar}/ echo message=-- JDK14 = ${jdk1.4.present}/ +echo message=-- JDK15 = ${jdk1.5.present} / javac srcdir=java destdir=${tomcat-util.build}/classes @@ -77,6 +79,7 @@ exclude name=**/util/threads/ThreadPoolMX* unless=modeler.present/ exclude name=**/util/compat/Jdk14Compat.java unless=jdk1.4.present / exclude name=**/util/net/jsse/JSSE14* unless=jdk1.4.present / +exclude name=**/util/net/jsse/JSSE15* unless=jdk1.5.present / exclude name=**/util/net/jsse/JSSEKeyManager.java unless=jdk1.4.present / /javac - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse JSSE15Factory.java JSSE15SocketFactory.java JSSEImplementation.java
billbarker2005/04/10 16:48:44 Modified:util/java/org/apache/tomcat/util/net/jsse JSSEImplementation.java Added: util/java/org/apache/tomcat/util/net/jsse JSSE15Factory.java JSSE15SocketFactory.java Log: Adding support for CRLs, at least with JDK 1.5 Revision ChangesPath 1.10 +24 -14 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java Index: JSSEImplementation.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JSSEImplementation.java 24 Feb 2004 08:50:05 - 1.9 +++ JSSEImplementation.java 10 Apr 2005 23:48:44 - 1.10 @@ -32,6 +32,8 @@ public class JSSEImplementation extends SSLImplementation { +static final String JSSE15Factory = + org.apache.tomcat.util.net.jsse.JSSE15Factory; static final String JSSE14Factory = org.apache.tomcat.util.net.jsse.JSSE14Factory; static final String JSSE13Factory = @@ -41,24 +43,32 @@ static org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(JSSEImplementation.class); -private JSSEFactory factory; +private JSSEFactory factory = null; public JSSEImplementation() throws ClassNotFoundException { // Check to see if JSSE is floating around somewhere Class.forName(SSLSocketClass); - if( JdkCompat.isJava14() ) { - try { - Class factcl = Class.forName(JSSE14Factory); - factory = (JSSEFactory)factcl.newInstance(); - } catch(Exception ex) { - factory = new JSSE13Factory(); - if(logger.isDebugEnabled()) { - logger.debug(Error getting factory: + JSSE14Factory, ex); - } - } - } else { - factory = new JSSE13Factory(); - } +if( JdkCompat.isJava15() ) { +try { +Class factcl = Class.forName(JSSE15Factory); +factory = (JSSEFactory)factcl.newInstance(); +} catch(Exception ex) { +if(logger.isDebugEnabled()) +logger.debug(Error getting factory: + JSSE15Factory, ex); +} +} +if(factory == null JdkCompat.isJava14() ) { +try { +Class factcl = Class.forName(JSSE14Factory); +factory = (JSSEFactory)factcl.newInstance(); +} catch(Exception ex) { +if(logger.isDebugEnabled()) { +logger.debug(Error getting factory: + JSSE14Factory, ex); +} +} +} if(factory == null) { +factory = new JSSE13Factory(); +} } 1.1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE15Factory.java Index: JSSE15Factory.java === /* * Copyright 1999-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.util.net.jsse; import java.net.Socket; import javax.net.ssl.SSLSocket; import org.apache.tomcat.util.net.SSLSupport; import org.apache.tomcat.util.net.ServerSocketFactory; /** * Implementation class for JSSEFactory for JSSE 1.1.x (that ships with the * 1.5 JVM). * * @author Bill Barker */ class JSSE15Factory extends JSSE14Factory { JSSE15Factory() { super(); } public ServerSocketFactory getSocketFactory() { return new JSSE15SocketFactory(); } } 1.1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE15SocketFactory.java Index: JSSE15SocketFactory.java === /* * Copyright 1999-2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/04/09 12:30:37 Modified:webapps/docs changelog.xml Log: Note SSL change, fix typo. Revision ChangesPath 1.284 +9 -1 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.283 retrieving revision 1.284 diff -u -r1.283 -r1.284 --- changelog.xml 4 Apr 2005 20:57:02 - 1.283 +++ changelog.xml 9 Apr 2005 19:30:37 - 1.284 @@ -68,7 +68,7 @@ to it would leak a minimal amount of memory) (remm) /fix update -Read patch causing Session.getId to throw an ISE, and make all internal components +Re-aad patch causing Session.getId to throw an ISE, and make all internal components use a safe getIdInternal method (remm) /update update @@ -82,6 +82,14 @@ /changelog /subsection + subsection name=Coyote + changelog + update +Add support for using Smart Cards as trust/keyStore. (billbarker) + /update + /changelog + /subsection + subsection name=Jasper changelog fix - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse JSSESocketFactory.java
billbarker2005/04/07 19:49:50 Modified:util/java/org/apache/tomcat/util/net/jsse JSSESocketFactory.java Log: Add support for using Smart Cards as trust/keyStore. Revision ChangesPath 1.18 +8 -8 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Index: JSSESocketFactory.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- JSSESocketFactory.java29 Aug 2004 17:14:42 - 1.17 +++ JSSESocketFactory.java8 Apr 2005 02:49:50 - 1.18 @@ -270,22 +270,22 @@ InputStream istream = null; try { ks = KeyStore.getInstance(type); -File keyStoreFile = new File(path); -if (!keyStoreFile.isAbsolute()) { -keyStoreFile = new File(System.getProperty(catalina.base), -path); +if(! PKCS11.equalsIgnoreCase(type) ) { +File keyStoreFile = new File(path); +if (!keyStoreFile.isAbsolute()) { +keyStoreFile = new File(System.getProperty(catalina.base), +path); +} +istream = new FileInputStream(keyStoreFile); } -istream = new FileInputStream(keyStoreFile); ks.load(istream, pass.toCharArray()); -istream.close(); -istream = null; } catch (FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { throw ioe; } catch(Exception ex) { -ex.printStackTrace(); +log.error(Exception trying to load keystore +path,ex); throw new IOException(Exception trying to load keystore + path + : + ex.getMessage() ); } finally { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/03/25 08:43:09 Modified:webapps/docs changelog.xml Log: doc change Revision ChangesPath 1.269 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.268 retrieving revision 1.269 diff -u -r1.268 -r1.269 --- changelog.xml 25 Mar 2005 08:29:34 - 1.268 +++ changelog.xml 25 Mar 2005 16:43:09 - 1.269 @@ -160,6 +160,9 @@ fix bug32741/bug: Fix spelling of committed [patch from Ben Souther] (yoavs) /fix + fix +bug34133/bug: Make setHeader clear multi-valued headers (billbarker) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java
billbarker2005/03/24 19:53:25 Modified:util/java/org/apache/tomcat/util/http MimeHeaders.java Log: Make setValue guarantee that the header is unique (that's how it's being used anyway). Fix for Bug #34113 Revision ChangesPath 1.7 +30 -18 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/MimeHeaders.java Index: MimeHeaders.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/MimeHeaders.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- MimeHeaders.java 24 Feb 2004 08:50:04 - 1.6 +++ MimeHeaders.java 25 Mar 2005 03:53:25 - 1.7 @@ -262,13 +262,19 @@ if this . */ public MessageBytes setValue( String name ) { - MessageBytes value=getValue(name); - if( value == null ) { - MimeHeaderField mh = createHeader(); - mh.getName().setString(name); - value=mh.getValue(); - } - return value; +for ( int i = 0; i count; i++ ) { +if(headers[i].getName().equalsIgnoreCase(name)) { +for ( int j=i+1; j count; j++ ) { +if(headers[j].getName().equalsIgnoreCase(name)) { +removeHeader(j--); +} +} +return headers[i].getValue(); +} +} +MimeHeaderField mh = createHeader(); +mh.getName().setString(name); +return mh.getValue(); } // Getting headers @@ -304,19 +310,25 @@ // warning: rather sticky code; heavily tuned for (int i = 0; i count; i++) { - if (headers[i].getName().equalsIgnoreCase(name)) { - // reset and swap with last header - MimeHeaderField mh = headers[i]; - - mh.recycle(); - headers[i] = headers[count - 1]; - headers[count - 1] = mh; +if (headers[i].getName().equalsIgnoreCase(name)) { +removeHeader(i--); +} +} +} - count--; - i--; - } - } +/** + * reset and swap with last header + * @param idx the index of the header to remove. + */ +private void removeHeader(int idx) { +MimeHeaderField mh = headers[idx]; + +mh.recycle(); +headers[idx] = headers[count - 1]; +headers[count - 1] = mh; +count--; } + } /** Enumerate the distinct header names. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardSession.java
billbarker2005/03/22 07:26:44 Modified:catalina/src/share/org/apache/catalina/session StandardSession.java Log: Reverting change. Note to self: Next time check the errata as well as -fr Revision ChangesPath 1.53 +6 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java Index: StandardSession.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- StandardSession.java 22 Mar 2005 03:50:03 - 1.52 +++ StandardSession.java 22 Mar 2005 15:26:44 - 1.53 @@ -409,7 +409,11 @@ */ public long getLastAccessedTime() { -return (this.lastAccessedTime); + if ( !isValid() ) { + throw new IllegalStateException + (sm.getString(standardSession.getLastAccessedTime.ise)); + } + return (this.lastAccessedTime); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardSession.java
billbarker2005/03/21 19:50:03 Modified:catalina/src/share/org/apache/catalina/session StandardSession.java Log: From the comments for R1.11, it seems that some early version of the spec had an exception here. However, this didn't survive to the final spec version, so we can once again allow access to getLastAccessedTime from an invalid session. Fix for Bug #34107 Revision ChangesPath 1.52 +2 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java Index: StandardSession.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- StandardSession.java 21 Mar 2005 20:02:21 - 1.51 +++ StandardSession.java 22 Mar 2005 03:50:03 - 1.52 @@ -408,10 +408,7 @@ * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { -if ( !isValid() ) { -throw new IllegalStateException -(sm.getString(standardSession.getLastAccessedTime.ise)); -} + return (this.lastAccessedTime); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2005/03/11 20:05:39 Modified:webapps/docs changelog.xml Log: doc changes Revision ChangesPath 1.240 +14 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.239 retrieving revision 1.240 diff -u -r1.239 -r1.240 --- changelog.xml 10 Mar 2005 23:54:45 - 1.239 +++ changelog.xml 12 Mar 2005 04:05:39 - 1.240 @@ -62,6 +62,20 @@ /fix /changelog /subsection + subsection name=Coyote + changelog + fix +bug33971/bug: Set remoteHost to null when Apache doesn't send one. (billbarker) + /fix + /changelog + /subsection + subsection name=Webapps + changelog + update + Use the standard struts taglib URIs in admin JSPs. (billbarker) + /update + /changelog + /subsection /section section name=Tomcat 5.5.8 (yoavs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/admin build.xml
billbarker2005/02/28 21:46:17 Modified:webapps/admin build.xml Log: Update for new Struts structure (so Gump can be happy again someday). This won't stop the nags until Gump starts building struts-taglib, but it's a start. Revision ChangesPath 1.16 +14 -10jakarta-tomcat-catalina/webapps/admin/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- build.xml 3 Sep 2004 09:33:06 - 1.15 +++ build.xml 1 Mar 2005 05:46:17 - 1.16 @@ -19,6 +19,9 @@ !-- Dependent JARs and files -- property name=servlet-api.jar value=${api.home}/jsr154/dist/lib/servlet-api.jar/ property name=jsp-api.jar value=${api.home}/jsr152/dist/lib/jsp-api.jar/ + property name=struts-core.jar value=${struts.jar} / + property name=struts-taglib.jar value=${struts.jar} / + property name=struts-taglib.lib value=${struts.lib} / !-- Construct Admin classpath -- path id=admin.classpath @@ -26,7 +29,7 @@ pathelement location=${jmx.jar}/ pathelement location=${servlet-api.jar}/ pathelement location=${jsp-api.jar}/ -pathelement location=${struts.jar}/ +pathelement location=${struts-core.jar}/ pathelement location=${commons-beanutils.jar}/ pathelement location=${commons-collections.jar}/ pathelement location=${commons-digester.jar}/ @@ -69,7 +72,7 @@ classpath=${jsp-api.jar} / available property=struts.present classname=org.apache.struts.action.ActionForm - classpath=${struts.jar} / + classpath=${struts-core.jar} / available property=beanutils.present classname=org.apache.commons.beanutils.PropertyUtils classpath=${commons-beanutils.jar} / @@ -80,7 +83,7 @@ available property=modeler.jar.present file=${commons-modeler.jar} / available property=servlet-api.jar.present file=${servlet-api.jar} / available property=jsp-api.jar.present file=${jsp-api.jar} / -available property=struts.jar.present file=${struts.jar} / +available property=struts.jar.present file=${struts-core.jar} / available property=beanutils.jar.present file=${commons-beanutils.jar} / !-- Conditional compilation flags (determined from the flags above) -- @@ -91,9 +94,6 @@ equals arg1=${struts.present} arg2=true / equals arg1=${jmx.present} arg2=true / equals arg1=${modeler.present} arg2=true / - available file=${struts.lib}/struts-bean.tld / - available file=${struts.lib}/struts-html.tld / - available file=${struts.lib}/struts-logic.tld / /and /or /condition @@ -159,10 +159,14 @@ !-- BUILD: Copy JARs == -- target name=copy-struts.jar if=struts.present -copy todir=${webapps.build}/${webapp.name}/WEB-INF/lib file=${struts.jar}/ -copy todir=${webapps.build}/${webapp.name}/WEB-INF file=${struts.lib}/struts-bean.tld/ -copy todir=${webapps.build}/${webapp.name}/WEB-INF file=${struts.lib}/struts-html.tld/ -copy todir=${webapps.build}/${webapp.name}/WEB-INF file=${struts.lib}/struts-logic.tld/ +copy todir=${webapps.build}/${webapp.name}/WEB-INF/lib file=${struts-core.jar}/ +copy todir=${webapps.build}/${webapp.name}/WEB-INF/lib file=${struts-taglib.jar} / +copy todir=${webapps.build}/${webapp.name}/WEB-INF file=${struts-taglib.lib}/struts-bean.tld +failonerror=false / +copy todir=${webapps.build}/${webapp.name}/WEB-INF file=${struts-taglib.lib}/struts-html.tld +failonerror=false / +copy todir=${webapps.build}/${webapp.name}/WEB-INF file=${struts-taglib.lib}/struts-logic.tld +failonerror=false / /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkCoyoteHandler.java
billbarker2005/02/02 19:36:57 Modified:jk/java/org/apache/jk/server JkCoyoteHandler.java Log: Cleanup exception handling in action, and remember error state so that we can close the connection without having to attempt another read. Fix for Bug #33374 Reported By: Lars George [EMAIL PROTECTED] Revision ChangesPath 1.59 +112 -90 jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java Index: JkCoyoteHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkCoyoteHandler.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- JkCoyoteHandler.java 11 Jan 2005 13:37:45 - 1.58 +++ JkCoyoteHandler.java 3 Feb 2005 03:36:57 - 1.59 @@ -96,6 +96,7 @@ public final int JK_STATUS_NEW=0; public final int JK_STATUS_HEAD=1; public final int JK_STATUS_CLOSED=2; +public final int JK_STATUS_ERROR=3; /** Set a property. Name is a component.property. JMX should * be used instead. @@ -311,11 +312,13 @@ res.finish(); } -ep.setStatus( JK_STATUS_NEW ); - req.recycle(); req.updateCounters(); res.recycle(); +if( ep.getStatus() == JK_STATUS_ERROR ) { +return ERROR; +} +ep.setStatus( JK_STATUS_NEW ); rp.setStage(Constants.STAGE_KEEPALIVE); return OK; } @@ -410,106 +413,125 @@ // Coyote Action implementation public void action(ActionCode actionCode, Object param) { -try { -if( actionCode==ActionCode.ACTION_COMMIT ) { -if( log.isDebugEnabled() ) log.debug(COMMIT ); -org.apache.coyote.Response res=(org.apache.coyote.Response)param; - -if( res.isCommitted() ) { -if( log.isInfoEnabled() ) -log.info(Response already commited ); -} else { +if( actionCode==ActionCode.ACTION_COMMIT ) { +if( log.isDebugEnabled() ) log.debug(COMMIT ); +org.apache.coyote.Response res=(org.apache.coyote.Response)param; + +if( res.isCommitted() ) { +if( log.isInfoEnabled() ) +log.info(Response already commited ); +} else { +try { appendHead( res ); +} catch(IOException iex) { +log.warn(Unable to send headers,iex); +MsgContext ep=(MsgContext)res.getNote( epNote ); +ep.setStatus(JK_STATUS_ERROR); } -} else if( actionCode==ActionCode.ACTION_RESET ) { -if( log.isDebugEnabled() ) -log.debug(RESET ); - -} else if( actionCode==ActionCode.ACTION_CLIENT_FLUSH ) { -if( log.isDebugEnabled() ) log.debug(CLIENT_FLUSH ); -org.apache.coyote.Response res=(org.apache.coyote.Response)param; -MsgContext ep=(MsgContext)res.getNote( epNote ); -ep.setType( JkHandler.HANDLE_FLUSH ); +} +} else if( actionCode==ActionCode.ACTION_RESET ) { +if( log.isDebugEnabled() ) +log.debug(RESET ); + +} else if( actionCode==ActionCode.ACTION_CLIENT_FLUSH ) { +if( log.isDebugEnabled() ) log.debug(CLIENT_FLUSH ); +org.apache.coyote.Response res=(org.apache.coyote.Response)param; +MsgContext ep=(MsgContext)res.getNote( epNote ); +ep.setType( JkHandler.HANDLE_FLUSH ); +try { ep.getSource().flush( null, ep ); - -} else if( actionCode==ActionCode.ACTION_CLOSE ) { -if( log.isDebugEnabled() ) log.debug(CLOSE ); - -org.apache.coyote.Response res=(org.apache.coyote.Response)param; -MsgContext ep=(MsgContext)res.getNote( epNote ); -if( ep.getStatus()== JK_STATUS_CLOSED ) { -// Double close - it may happen with forward -if( log.isDebugEnabled() ) log.debug(Double CLOSE - forward ? + res.getRequest().requestURI() ); -return; -} +} catch(IOException iex) { +// This is logged elsewhere, so debug only here +log.debug(Error during flush,iex); +res.setErrorException(iex); +ep.setStatus(JK_STATUS_ERROR); +} + +} else if( actionCode==ActionCode.ACTION_CLOSE ) { +if( log.isDebugEnabled() ) log.debug
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties LocalStrings_ja.properties
billbarker2005/01/08 13:14:21 Modified:src/share/org/apache/tomcat/modules/generators ErrorHandler.java StaticInterceptor.java src/share/org/apache/tomcat/resources LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties LocalStrings_ja.properties Log: Remove dependancy on o.a.t.u.http.LocaleToCharsetMap, since it doesn't exist anymore. Revision ChangesPath 1.32 +43 -9 jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java Index: ErrorHandler.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- ErrorHandler.java 21 Nov 2004 03:59:16 - 1.31 +++ ErrorHandler.java 8 Jan 2005 21:14:21 - 1.32 @@ -30,7 +30,6 @@ import org.apache.tomcat.core.TomcatException; import org.apache.tomcat.util.net.URL; import org.apache.tomcat.util.http.HttpMessages; -import org.apache.tomcat.util.http.LocaleToCharsetMap; import org.apache.tomcat.util.log.Log; import org.apache.tomcat.util.qlog.Logger; import org.apache.tomcat.util.res.StringManager; @@ -45,10 +44,25 @@ private Context rootContext=null; boolean showDebugInfo=true; int defaultRedirectStatus=301; +private String charset = null; public ErrorHandler() { } +/** + * Set the charset to use for error page generation. + */ +public void setUseCharset(String ucs) { + charset = ucs; +} + +/** + * Get the charset to use for error page generation. + */ +public String getUseCharset() { + return charset; +} + public void setShowDebugInfo( boolean b ) { showDebugInfo=b; } @@ -436,12 +450,14 @@ getManager(org.apache.tomcat.resources); int sbNote=0; boolean showDebugInfo=true; +private String useCharset; -NotFoundHandler(BaseInterceptor bi, boolean showDebugInfo) { +NotFoundHandler(ErrorHandler bi, boolean showDebugInfo) { // setOrigin( Handler.ORIGIN_INTERNAL ); name=tomcat.notFoundHandler; setModule(bi); this.showDebugInfo=showDebugInfo; + useCharset = bi.getUseCharset(); } public void doService(Request req, Response res) @@ -449,7 +465,10 @@ { String msg=(String)req.getAttribute(javax.servlet.error.message); - String charset = LocaleToCharsetMap.getCharset(Locale.getDefault()); + String charset = useCharset; + if(charset == null) { + charset = req.getCharEncoding(); + } if (charset == null) { res.setContentType(text/html); } else { @@ -519,12 +538,14 @@ getManager(org.apache.tomcat.resources); int sbNote=0; boolean showDebugInfo=true; +private String useCharset; -ExceptionHandler(BaseInterceptor bi, boolean showDebugInfo) { +ExceptionHandler(ErrorHandler bi, boolean showDebugInfo) { // setOrigin( Handler.ORIGIN_INTERNAL ); name=tomcat.exceptionHandler; setModule( bi ); this.showDebugInfo=showDebugInfo; + useCharset = bi.getUseCharset(); } public void doService(Request req, Response res) @@ -560,7 +581,10 @@ // only include head...body if reset was successful if ( needsHead ) { - String charset = LocaleToCharsetMap.getCharset(Locale.getDefault()); + String charset = useCharset; + if(charset == null) { + charset = req.getCharEncoding(); + } if (charset == null) res.setContentType(text/html); else { @@ -637,12 +661,14 @@ getManager(org.apache.tomcat.resources); int sbNote=0; boolean showDebugInfo=true; +private String useCharset; -StatusHandler(BaseInterceptor bi, boolean showDebugInfo) { +StatusHandler(ErrorHandler bi, boolean showDebugInfo) { //setOrigin( Handler.ORIGIN_INTERNAL ); name=tomcat.statusHandler; setModule( bi ); this.showDebugInfo=showDebugInfo; + useCharset = bi.getUseCharset(); } // We don't want interceptors called for redirect @@ -664,7 +690,10 @@ // don't set a content type if we are answering If-Modified-Since. // Proxy caches might update their cached content-type with this // info (mod_proxy does it). Martin Algesten 15th Oct, 2002. - String charset = LocaleToCharsetMap.getCharset(Locale.getDefault()); + String charset = useCharset; + if(charset == null) { + charset
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardEngine.java StandardHost.java
billbarker2004/12/22 22:11:52 Modified:catalina/src/share/org/apache/catalina/core StandardEngine.java StandardHost.java Log: Fix the locating of orphaned Realms for JMX embedding. Since Realms don't implement managedResource, this is the only way to get this unused method to work. Revision ChangesPath 1.27 +5 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java Index: StandardEngine.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- StandardEngine.java 3 Oct 2004 08:53:56 - 1.26 +++ StandardEngine.java 23 Dec 2004 06:11:51 - 1.27 @@ -412,9 +412,10 @@ try { realmName=new ObjectName( domain + :type=Realm); if( mserver.isRegistered(realmName ) ) { -Realm nrealm = (Realm)mserver.getAttribute(realmName, - managedResource); -setRealm(nrealm); +mserver.invoke(realmName, init, +new Object[] {}, +new String[] {} +); } } catch( Throwable t ) { log.debug(No realm for this engine + realmName); 1.36 +5 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java Index: StandardHost.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- StandardHost.java 5 Oct 2004 17:12:51 - 1.35 +++ StandardHost.java 23 Dec 2004 06:11:51 - 1.36 @@ -676,9 +676,10 @@ try { realmName=new ObjectName( domain + :type=Realm,host= + getName()); if( mserver.isRegistered(realmName ) ) { -Realm nrealm = (Realm)mserver.getAttribute(realmName, - managedResource); -setRealm(nrealm); +mserver.invoke(realmName, init, +new Object[] {}, +new String[] {} +); } } catch( Throwable t ) { log.debug(No realm for this host + realmName); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 Makefile.in
billbarker2004/12/17 19:49:04 Modified:jk/native/apache-2.0 Makefile.in Log: Fix build for --with-apache=/path/to/apache-src Reported By: Gump [EMAIL PROTECTED] Revision ChangesPath 1.16 +1 -0 jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in Index: Makefile.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/Makefile.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Makefile.in 9 Sep 2002 15:35:49 - 1.15 +++ Makefile.in 18 Dec 2004 03:49:04 - 1.16 @@ -8,6 +8,7 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ # Defaults libexecdir=${APACHE_DIR}/modules - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java
billbarker2004/12/16 19:02:41 Modified:jk/java/org/apache/jk/common HandlerRequest.java Log: Fix weird NumberFormatException. Apache never sends Content-Length as a String, which is probably why this one has been here so long. Reported By: Allistair Crossley [EMAIL PROTECTED] Revision ChangesPath 1.41 +3 -6 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- HandlerRequest.java 11 Dec 2004 04:00:35 - 1.40 +++ HandlerRequest.java 17 Dec 2004 03:02:41 - 1.41 @@ -675,8 +675,6 @@ hId = -1; msg.getBytes( tmpMB ); ByteChunk bc=tmpMB.getByteChunk(); -//hName=tmpMB.toString(); -//vMB=headers.addValue( hName ); vMB=headers.addValue( bc.getBuffer(), bc.getStart(), bc.getLength() ); } @@ -684,12 +682,11 @@ msg.getBytes(vMB); if (hId == SC_REQ_CONTENT_LENGTH || -tmpMB.equalsIgnoreCase(Content-Length)) { +(hId == -1 tmpMB.equalsIgnoreCase(Content-Length))) { // just read the content-length header, so set it -int contentLength = (vMB == null) ? -1 : vMB.getInt(); -req.setContentLength(contentLength); +req.setContentLength( vMB.getInt() ); } else if (hId == SC_REQ_CONTENT_TYPE || - tmpMB.equalsIgnoreCase(Content-Type)) { +(hId == -1 tmpMB.equalsIgnoreCase(Content-Type))) { // just read the content-type header, so set it ByteChunk bchunk = vMB.getByteChunk(); req.contentType().setBytes(bchunk.getBytes(), - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
billbarker2004/12/16 19:14:56 Modified:jk/native/apache-1.3 mod_jk.c jk/native/apache-2.0 mod_jk.c Log: Now that the SC lookup is case-insensitive, don't waste cycles converting the header names to lower case Revision ChangesPath 1.60 +2 -6 jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- mod_jk.c 13 Dec 2004 09:11:24 - 1.59 +++ mod_jk.c 17 Dec 2004 03:14:56 - 1.60 @@ -592,12 +592,8 @@ char *hname = ap_pstrdup(r-pool, elts[i].key); s-headers_values[i] = ap_pstrdup(r-pool, elts[i].val); s-headers_names[i] = hname; -while (*hname) { -*hname = tolower(*hname); -hname++; -} if (need_content_length_header -!strncmp(s-headers_values[i], content-length, 14)) { +!strcasecmp(s-headers_values[i], content-length)) { need_content_length_header = JK_FALSE; } } 1.110 +2 -6 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -r1.109 -r1.110 --- mod_jk.c 13 Dec 2004 09:10:31 - 1.109 +++ mod_jk.c 17 Dec 2004 03:14:56 - 1.110 @@ -636,12 +636,8 @@ char *hname = apr_pstrdup(r-pool, elts[i].key); s-headers_values[i] = apr_pstrdup(r-pool, elts[i].val); s-headers_names[i] = hname; -while (*hname) { -*hname = tolower(*hname); -hname++; -} if (need_content_length_header -!strncmp(s-headers_values[i], content-length, 14)) { +!strcasecmp(s-headers_values[i], content-length)) { need_content_length_header = JK_FALSE; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util IntrospectionUtils.java
billbarker2004/12/15 19:51:42 Modified:util/java/org/apache/tomcat/util IntrospectionUtils.java Log: Ignore '$' chars that aren't part of a '${' replacement pattern. Unlike with ant (which of course is what this is based off of), with this patch you no longer have $$ - $. Based on patch by: Richard Clark [EMAIL PROTECTED] Fix for Bug #32719 Revision ChangesPath 1.14 +2 -2 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java Index: IntrospectionUtils.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- IntrospectionUtils.java 4 Oct 2004 09:25:55 - 1.13 +++ IntrospectionUtils.java 16 Dec 2004 03:51:41 - 1.14 @@ -473,8 +473,8 @@ sb.append('$'); prev = pos + 1; } else if (value.charAt(pos + 1) != '{') { -sb.append(value.charAt(pos + 1)); -prev = pos + 2; // XXX +sb.append('$'); +prev = pos + 1; // XXX } else { int endName = value.indexOf('}', pos); if (endName 0) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse JSSE13SocketFactory.java
billbarker2004/12/13 23:02:32 Modified:util/java/org/apache/tomcat/util/net/jsse JSSE13SocketFactory.java Log: JSSE 1.0.x doesn't include sun.security.provider.Sun, so we can't assume that it will be available. Fix for Bug #32680 Revision ChangesPath 1.10 +7 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE13SocketFactory.java Index: JSSE13SocketFactory.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE13SocketFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JSSE13SocketFactory.java 2 Jul 2004 03:27:39 - 1.9 +++ JSSE13SocketFactory.java 14 Dec 2004 07:02:32 - 1.10 @@ -20,6 +20,7 @@ import java.security.KeyStore; import java.security.SecureRandom; import java.security.Security; +import java.security.Provider; import javax.net.ssl.SSLServerSocket; import javax.net.ssl.SSLSocket; @@ -66,7 +67,12 @@ */ void init() throws IOException { try { -Security.addProvider (new sun.security.provider.Sun()); +try { +Class ssps = Class.forName(sun.security.provider.Sun); +Security.addProvider ((Provider)ssps.newInstance()); +}catch(Exception cnfe) { +//Ignore, since this is a non-Sun JVM +} Security.addProvider (new com.sun.net.ssl.internal.ssl.Provider()); String clientAuthStr = (String)attributes.get(clientauth); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2004/12/11 00:06:20 Modified:webapps/docs changelog.xml Log: Documenting changes Revision ChangesPath 1.204 +12 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.203 retrieving revision 1.204 diff -u -r1.203 -r1.204 --- changelog.xml 10 Dec 2004 00:03:59 - 1.203 +++ changelog.xml 11 Dec 2004 08:06:20 - 1.204 @@ -66,6 +66,18 @@ fix bug32585/bug: Better handling for content length greater than Integer.MAX_VALUE in response. (markt) /fix + update +Allow ApacheConfig and friends to live under an Engine. (billbarker) + /update + update +Syncronize access to the Jk Request registration count. (billbarker) + /update + update +Speed the MsgContext on its way to GC. (billbarker) + /update + fix +Keep correct thread counts in Thread pool when thread ends in an exception (billbarker) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads ThreadPool.java
billbarker2004/12/10 19:52:56 Modified:util/java/org/apache/tomcat/util/threads ThreadPool.java Log: We need to set the local copies, otherwise the thread counts get wacked. This mostly effects the TC 3.3 legacy Connectors. It is almost impossible for the Coyote Connectors to throw out of 'runIt'. Revision ChangesPath 1.30 +2 -2 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java Index: ThreadPool.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- ThreadPool.java 12 Oct 2004 08:03:33 - 1.29 +++ ThreadPool.java 11 Dec 2004 03:52:56 - 1.30 @@ -699,8 +699,8 @@ * The meaning is that we should release the thread from * the pool. */ -shouldTerminate = true; -shouldRun = false; +_shouldTerminate = true; +_shouldRun = false; p.notifyThreadEnd(this); } finally { if (_shouldRun) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java
billbarker2004/12/10 20:00:35 Modified:jk/java/org/apache/jk/common HandlerRequest.java Log: Syncronize access to the Request registration count. There are reports on the user list that this isn't close enough to atomic, and doesn't happen often enough to worry about the overhead of syncronized. Revision ChangesPath 1.40 +8 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- HandlerRequest.java 17 Sep 2004 04:50:47 - 1.39 +++ HandlerRequest.java 11 Dec 2004 04:00:35 - 1.40 @@ -189,6 +189,11 @@ */ public static final int HOSTBUFFER = 10; +/** + * Thread lock. + */ +private static Object lock = new Object(); + HandlerDispatch dispatch; String ajpidDir=conf; @@ -451,7 +456,9 @@ req.setResponse(res); ep.setRequest( req ); if( registerRequests ) { -ep.getSource().registerRequest(req, ep, count++); +synchronized(lock) { +ep.getSource().registerRequest(req, ep, count++); +} } } return req; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelSocket.java
billbarker2004/12/10 22:32:13 Modified:jk/java/org/apache/jk/common ChannelSocket.java Log: Speed the MsgContext on its way to GC. The ControlRunnable will retain a reference to the TPR, so the endpoint will stay until the CR is reused. May or may not help with BZ #32141 Revision ChangesPath 1.50 +1 -0 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- ChannelSocket.java20 Nov 2004 02:39:34 - 1.49 +++ ChannelSocket.java11 Dec 2004 06:32:13 - 1.50 @@ -866,5 +866,6 @@ public void runIt(Object perTh[]) { wajp.processConnection(ep); +ep = null; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/config ApacheConfig.java BaseJkConfig.java IISConfig.java NSConfig.java
billbarker2004/12/04 22:29:15 Modified:jk/java/org/apache/jk/config ApacheConfig.java BaseJkConfig.java IISConfig.java NSConfig.java Log: Allow ApacheConfig and friends to live under an Engine. Using an Engine gives the all-in config generation like with TC 3.3 (except for the generate every time at startup :), so it shouldn't be mixed with Host/Context instances. Also convert to c-l, and a couple of formatting changes. Revision ChangesPath 1.5 +17 -14 jakarta-tomcat-connectors/jk/java/org/apache/jk/config/ApacheConfig.java Index: ApacheConfig.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/config/ApacheConfig.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ApacheConfig.java 29 Aug 2004 17:14:41 - 1.4 +++ ApacheConfig.java 5 Dec 2004 06:29:15 - 1.5 @@ -115,7 +115,10 @@ @author Bill Barker */ public class ApacheConfig extends BaseJkConfig { - + +private static org.apache.commons.logging.Log log = +org.apache.commons.logging.LogFactory.getLog(ApacheConfig.class); + /** default path to mod_jk .conf location */ public static final String MOD_JK_CONFIG = conf/auto/mod_jk.conf; /** default path to workers.properties file @@ -254,10 +257,10 @@ // Fail if mod_jk not found, let the user know the problem // instead of running into problems later. if( ! modJk.exists() ) { - log( mod_jk location: + modJk ); - log( Make sure it is installed corectly or + + log.info( mod_jk location: + modJk ); + log.info( Make sure it is installed corectly or + set the config location ); - log( Using Listener className=\+getClass().getName()+\ modJk=\PATH_TO_MOD_JK.SO_OR_DLL\ / ); + log.info( Using Listener className=\+getClass().getName()+\ modJk=\PATH_TO_MOD_JK.SO_OR_DLL\ / ); } // Verify the file exists !! @@ -272,10 +275,10 @@ // Fail if workers file not found, let the user know the problem // instead of running into problems later. if( ! workersConfig.exists() ) { - log( Can't find workers.properties at + workersConfig ); - log( Please install it in the default location or + + log.warn( Can't find workers.properties at + workersConfig ); + log.warn( Please install it in the default location or + set the config location ); - log( Using Listener className=\ + getClass().getName() + \ workersConfig=\FULL_PATH\ / ); + log.warn( Using Listener className=\ + getClass().getName() + \ workersConfig=\FULL_PATH\ / ); return false; } @@ -393,7 +396,7 @@ Host vhost = getHost(context); if( noRoot .equals(ctxPath) ) { -log(Ignoring root context in non-forward-all mode ); +log.debug(Ignoring root context in non-forward-all mode ); return; } @@ -431,8 +434,8 @@ protected boolean addExtensionMapping( String ctxPath, String ext, PrintWriter mod_jk ) { -if( debug 0 ) -log( Adding extension map for + ctxPath + /*. + ext ); +if( log.isDebugEnabled() ) +log.debug( Adding extension map for + ctxPath + /*. + ext ); mod_jk.println(indent + JkMount + ctxPath + /*. + ext + + jkWorker); return true; @@ -442,16 +445,16 @@ /** Add a fulling specified Appache mapping. */ protected boolean addMapping( String fullPath, PrintWriter mod_jk ) { -if( debug 0 ) -log( Adding map for + fullPath ); +if( log.isDebugEnabled() ) +log.debug( Adding map for + fullPath ); mod_jk.println(indent + JkMount + fullPath ++ jkWorker ); return true; } /** Add a partially specified Appache mapping. */ protected boolean addMapping( String ctxP, String ext, PrintWriter mod_jk ) { -if( debug 0 ) -log( Adding map for + ext ); +if( log.isDebugEnabled() ) +log.debug( Adding map for + ext ); if(! ext.startsWith(/) ) ext = / + ext; if(ext.length() 1) 1.4 +206 -181 jakarta-tomcat-connectors/jk/java/org/apache/jk/config/BaseJkConfig.java Index: BaseJkConfig.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/config/BaseJkConfig.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BaseJkConfig.java 29 Aug 2004 17:14:41 -
cvs commit: jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin TreeControlTag.java
billbarker2004/12/01 19:49:01 Modified:webapps/admin tree-control-test.jsp webapps/admin/WEB-INF/classes/org/apache/webapp/admin TreeControlTag.java Log: Fix problem where EL expression is used as a place holder. Fix for Bug #32381 Submitted By: Allistair Crossley [EMAIL PROTECTED] Revision ChangesPath 1.3 +1 -2 jakarta-tomcat-catalina/webapps/admin/tree-control-test.jsp Index: tree-control-test.jsp === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/tree-control-test.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tree-control-test.jsp 24 Jul 2002 20:57:25 - 1.2 +++ tree-control-test.jsp 2 Dec 2004 03:49:01 - 1.3 @@ -18,9 +18,8 @@ !-- Tree Component -- -td width=200 controls:tree tree=treeControlTest - action=treeControlTest.do?tree=${name} + action=treeControlTest.do?tree={name} style=tree-control styleSelected=tree-control-selected styleUnselected=tree-control-unselected 1.5 +5 -5 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java Index: TreeControlTag.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TreeControlTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TreeControlTag.java 18 Oct 2004 06:37:53 - 1.4 +++ TreeControlTag.java 2 Dec 2004 03:49:01 - 1.5 @@ -33,7 +33,7 @@ * This tag has the following user-settable attributes:/p * ul * listrongaction/strong - Hyperlink to which expand/contract actions - * should be sent, with a string code${node}/code marking where + * should be sent, with a string code{name}/code marking where * the node name of the affected node should be included./li * listrongimages/strong - Name of the directory containing the images * for our icons, relative to the page including this tag. If not @@ -88,7 +88,7 @@ /** * The hyperlink to be used for submitting requests to expand and - * contract tree nodes. The placeholder code${name}/code will + * contract tree nodes. The placeholder code{name}/code will * be replaced by the codename/code property of the current * tree node. */ @@ -350,11 +350,11 @@ // character in parameter values. String encodedNodeName = URLEncoder.encode(node.getName(),TomcatTreeBuilder.URL_ENCODING); -String action = replace(getAction(), ${name}, encodedNodeName); +String action = replace(getAction(), {name}, encodedNodeName); String updateTreeAction = -replace(getAction(), tree=${name}, select= + encodedNodeName); +replace(getAction(), tree={name}, select= + encodedNodeName); updateTreeAction = ((HttpServletResponse) pageContext.getResponse()). encodeURL(updateTreeAction); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
billbarker2004/12/01 22:03:43 Modified:webapps/docs changelog.xml Log: Documenting Revision ChangesPath 1.193 +10 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.192 retrieving revision 1.193 diff -u -r1.192 -r1.193 --- changelog.xml 2 Dec 2004 00:54:20 - 1.192 +++ changelog.xml 2 Dec 2004 06:03:43 - 1.193 @@ -127,6 +127,12 @@ update Greatly reduce the amount of recycle method calls on the buffers (remm) /update + fixAdd null OName check for Request unregistration in Jk, to remove + exception under JDK 1.5. (billbarker) + /fix + fixbug32292/bug: Don't send keep-alive header when the protocol + can't be parsed. (billbarker) + /fix /changelog /subsection @@ -171,6 +177,10 @@ update Add log4j docs submitted by Allistair Crossley. (remm) /update + fixbug32381/bug: Fix problem where EL expression is used as a +place holder in the admin webapp. +Submitted by Allistair Crossley. (billbarker) + /fix /changelog /subsection /section - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java
billbarker2004/11/21 22:42:46 Modified:http11/src/java/org/apache/coyote/http11 Http11Processor.java Log: Reverting reversion of patch ;-) Revision ChangesPath 1.115 +1 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java Index: Http11Processor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- Http11Processor.java 20 Nov 2004 21:59:49 - 1.114 +++ Http11Processor.java 22 Nov 2004 06:42:46 - 1.115 @@ -1542,7 +1542,7 @@ keepAlive = keepAlive !statusDropsConnection(statusCode); if (!keepAlive) { headers.addValue(Constants.CONNECTION).setString(Constants.CLOSE); -} else if (!http11) { +} else if (!http11 !error) { headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java
billbarker2004/11/20 13:59:49 Modified:http11/src/java/org/apache/coyote/http11 Http11Processor.java Log: Reverting patch per vote on tomcat-dev Revision ChangesPath 1.114 +1 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java Index: Http11Processor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- Http11Processor.java 20 Nov 2004 03:04:28 - 1.113 +++ Http11Processor.java 20 Nov 2004 21:59:49 - 1.114 @@ -1542,7 +1542,7 @@ keepAlive = keepAlive !statusDropsConnection(statusCode); if (!keepAlive) { headers.addValue(Constants.CONNECTION).setString(Constants.CLOSE); -} else if (!http11 !error) { +} else if (!http11) { headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor2.java Tomcat3Adapter.java Tomcat3Request.java
billbarker2004/11/20 18:45:04 Modified:coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor2.java Tomcat3Adapter.java Tomcat3Request.java Log: Adding support for 'redirectPort'. This works the same as it does on TC 4+. You configure it on the Connector, and your security-constraints can just use the redirect. Revision ChangesPath 1.21 +28 -4 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java Index: CoyoteInterceptor2.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- CoyoteInterceptor2.java 5 Oct 2004 04:45:55 - 1.20 +++ CoyoteInterceptor2.java 21 Nov 2004 02:45:03 - 1.21 @@ -77,10 +77,13 @@ */ public class CoyoteInterceptor2 extends BaseInterceptor { +public static final String REDIRECT_PORT_ATTR = + org.apache.tomcat.request.redirectPort; private String processorClassName=org.apache.coyote.http11.Http11Protocol; Tomcat3Adapter adapter; ProtocolHandler proto; int protocolNote; +int redirectPort = -1; public CoyoteInterceptor2() { super(); @@ -109,6 +112,21 @@ setAttribute( prop, value ); } +/** + * Set the redirect port. + */ +public void setRedirectPort(int rp) { + redirectPort = rp; + setAttribute(redirectPort, new Integer(rp)); +} + +/** + * Get the redirect port. + */ +public int getRedirectPort() { + return redirectPort; +} + /** Called when the ContextManger is started */ public void engineInit(ContextManager cm) throws TomcatException { @@ -116,7 +134,7 @@ protocolNote = cm.getNoteId(ContextManager.MODULE_NOTE, coyote.protocol); -adapter=new Tomcat3Adapter(cm); +adapter=new Tomcat3Adapter(cm, this); try { Class c=Class.forName(processorClassName); proto=(ProtocolHandler)c.newInstance(); @@ -204,8 +222,12 @@ return null; Tomcat3Request httpReq=(Tomcat3Request)request; - -if(key!=null httpReq!=null ){ + +if( httpReq == null || httpReq.getConnector() != this ) { + return null; + } + +if(key!=null ){ org.apache.coyote.Request cReq = httpReq.getCoyoteRequest(); Object info = cReq.getAttribute(key); if( info != null) @@ -222,7 +244,9 @@ } return cReq.getAttribute(key); -} +} else if(key.equals(REDIRECT_PORT_ATTR)) { + return new Integer(redirectPort); + } return cReq.getAttribute( key ); } 1.9 +5 -1 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Adapter.java Index: Tomcat3Adapter.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Adapter.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Tomcat3Adapter.java 29 Aug 2004 17:14:41 - 1.8 +++ Tomcat3Adapter.java 21 Nov 2004 02:45:03 - 1.9 @@ -18,6 +18,7 @@ import org.apache.coyote.Adapter; import org.apache.tomcat.core.ContextManager; +import org.apache.tomcat.core.BaseInterceptor; /** Adapter between Coyote and Tomcat. * @@ -29,9 +30,11 @@ */ public class Tomcat3Adapter implements Adapter { ContextManager cm; +BaseInterceptor connector; -Tomcat3Adapter(ContextManager ctxman) { +Tomcat3Adapter(ContextManager ctxman, CoyoteInterceptor2 conn) { cm = ctxman; + connector = conn; } static int containerRequestNOTE=1; // XXX Implement a NoteManager, namespaces. @@ -53,6 +56,7 @@ reqA.setCoyoteRequest(request); resA.setCoyoteResponse(response); + reqA.setConnector(connector); request.setNote( containerRequestNOTE, reqA ); } else { resA=(Tomcat3Response)reqA.getResponse(); 1.15 +15 -1 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java Index: Tomcat3Request.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Request.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa AccessInterceptor.java
billbarker2004/11/20 18:47:01 Modified:src/share/org/apache/tomcat/modules/aaa AccessInterceptor.java Log: Process the redirect to https if the redirectPort is specified Revision ChangesPath 1.23 +15 -0 jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java Index: AccessInterceptor.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- AccessInterceptor.java25 Feb 2004 06:52:40 - 1.22 +++ AccessInterceptor.java21 Nov 2004 02:47:01 - 1.23 @@ -305,6 +305,21 @@ if( CONFIDENTIAL.equalsIgnoreCase(transp) || INTEGRAL.equalsIgnoreCase(transp) ) { if( ! req.scheme().equals(https)) { + Integer rp = (Integer)req.getAttribute(org.apache.tomcat.request.redirectPort); + if(rp != null rp.intValue() 0) { + StringBuffer rsb = new StringBuffer(); + rsb.append(https://;).append(req.serverName()); + if(rp.intValue() != 443) { + rsb.append(':').append(rp); + } + rsb.append(req.requestURI()); + if(!req.query().isNull()) { + rsb.append('?').append(req.query()); + } + req.setAttribute(javax.servlet.error.message, + rsb.toString()); + return 301; + } // We could redirect or do something advanced - but the spec // only requires us to deny access. A nice error handler // would also be nice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat build.xml
billbarker2004/11/19 00:15:53 Modified:.build.xml Log: Fix the build for new Jk doc location. Revision ChangesPath 1.206 +1 -2 jakarta-tomcat/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.205 retrieving revision 1.206 diff -u -r1.205 -r1.206 --- build.xml 20 Oct 2004 05:29:54 - 1.205 +++ build.xml 19 Nov 2004 08:15:53 - 1.206 @@ -867,11 +867,10 @@ /copy mkdir dir=${tomcat.build}/webapps/ROOT/doc/jk2 / mkdir dir=${tomcat.build}/webapps/ROOT/doc/jk2/printer / -ant dir=${tomcat-jk.home} target=docs/ +ant dir=${tomcat-jk.home}/xdocs / copy todir=${tomcat.build}/webapps/ROOT/doc/jk2 fileset dir=${tomcat-jk.home}/build/docs/ /copy - !-- admin context -- mkdir dir=${tomcat.build}/webapps/admin/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs build.xml
billbarker2004/11/19 07:52:51 Modified:webapps/tomcat-docs build.xml Log: Fix Gump build. Revision ChangesPath 1.14 +4 -5 jakarta-tomcat-4.0/webapps/tomcat-docs/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- build.xml 12 Jan 2003 17:26:46 - 1.13 +++ build.xml 19 Nov 2004 15:52:51 - 1.14 @@ -169,11 +169,10 @@ !-- Build Coyote JK2 documentation -- mkdir dir=${webapps.build}/${webapp.name}/jk2/ mkdir dir=${webapps.build}/${webapp.name}/jk2/printer/ -ant dir=${tomcat-jk.home} target=docs/ - -copy todir=${webapps.build}/${webapp.name}/jk2 - fileset dir=${tomcat-jk.home}/build/docs/ -/copy +ant dir=${tomcat-jk.home}/xdocs / + property name=build.dir value=${webapps.build}/${webapp.name} / + property name=dist.name value=jk2 / +/ant /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelSocket.java ChannelUn.java
billbarker2004/11/19 18:39:34 Modified:jk/java/org/apache/jk/common ChannelSocket.java ChannelUn.java Log: It seems that the 1.5 JVM is less tolarant of 'null' ONames. Reported By: Allistair Crossley [EMAIL PROTECTED] Revision ChangesPath 1.49 +3 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- ChannelSocket.java17 Sep 2004 04:08:53 - 1.48 +++ ChannelSocket.java20 Nov 2004 02:39:34 - 1.49 @@ -703,7 +703,9 @@ Request req = (Request)ep.getRequest(); if( req != null ) { ObjectName roname = (ObjectName)ep.getNote(JMXRequestNote); -Registry.getRegistry().unregisterComponent(roname); +if( roname != null ) { +Registry.getRegistry().unregisterComponent(roname); +} req.getRequestProcessor().setGlobalProcessor(null); } } catch( Exception ee) { 1.29 +3 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java Index: ChannelUn.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ChannelUn.java31 May 2004 04:48:54 - 1.28 +++ ChannelUn.java20 Nov 2004 02:39:34 - 1.29 @@ -312,7 +312,9 @@ Request req = (Request)ep.getRequest(); if( req != null ) { ObjectName roname = (ObjectName)ep.getNote(JMXRequestNote); -Registry.getRegistry().unregisterComponent(roname); +if( roname != null ) { +Registry.getRegistry().unregisterComponent(roname); +} req.getRequestProcessor().setGlobalProcessor(null); } } catch( Exception ee) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java
billbarker2004/11/19 19:04:28 Modified:http11/src/java/org/apache/coyote/http11 Http11Processor.java Log: If we are in the error state, we aren't going to keep-alive. So don't lie to the UA that we are. Fix for Bug #32292 Revision ChangesPath 1.113 +1 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java Index: Http11Processor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- Http11Processor.java 1 Oct 2004 23:36:15 - 1.112 +++ Http11Processor.java 20 Nov 2004 03:04:28 - 1.113 @@ -1542,7 +1542,7 @@ keepAlive = keepAlive !statusDropsConnection(statusCode); if (!keepAlive) { headers.addValue(Constants.CONNECTION).setString(Constants.CLOSE); -} else if (!http11) { +} else if (!http11 !error) { headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
billbarker2004/11/18 22:07:56 Modified:catalina/src/share/org/apache/catalina Globals.java catalina/src/share/org/apache/catalina/connector Request.java Log: Since we are documenting the SSL Session ID attribute, treat it like other SSL attributes. Revision ChangesPath 1.13 +8 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java Index: Globals.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Globals.java 15 Oct 2004 00:18:35 - 1.12 +++ Globals.java 19 Nov 2004 06:07:56 - 1.13 @@ -144,6 +144,13 @@ public static final String KEY_SIZE_ATTR = javax.servlet.request.key_size; +/** + * The request attribute under which we store the session id being used + * for this SSL connection (as an object of type java.lang.String). + */ +public static final String SSL_SESSION_ID_ATTR = +javax.servlet.request.ssl_session; + /** * The servlet context attribute under which the managed bean Registry 1.17 +7 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Request.java 26 Oct 2004 15:42:05 - 1.16 +++ Request.java 19 Nov 2004 06:07:56 - 1.17 @@ -863,6 +863,10 @@ if(attr != null) { attributes.put(Globals.KEY_SIZE_ATTR, attr); } +attr = coyoteRequest.getAttribute(Globals.SSL_SESSION_ID_ATTR); +if(attr != null) { +attributes.put(Globals.SSL_SESSION_ID_ATTR, attr); +} attr = attributes.get(name); } return attr; @@ -875,7 +879,8 @@ static boolean isSSLAttribute(String name) { return Globals.CERTIFICATES_ATTR.equals(name) || Globals.CIPHER_SUITE_ATTR.equals(name) || -Globals.KEY_SIZE_ATTR.equals(name); +Globals.KEY_SIZE_ATTR.equals(name) || +Globals.SSL_SESSION_ID_ATTR.equals(name); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/netscape jk_nsapi_plugin.c
billbarker2004/10/22 20:02:32 Modified:jk/native/netscape jk_nsapi_plugin.c Log: Add the cert header and footer line to the SSL cert. Fix for bug #31766 Based on submission by: Nathan Clement [EMAIL PROTECTED] Revision ChangesPath 1.13 +12 -3 jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c Index: jk_nsapi_plugin.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/netscape/jk_nsapi_plugin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_nsapi_plugin.c 8 Oct 2004 08:55:14 - 1.12 +++ jk_nsapi_plugin.c 23 Oct 2004 03:02:32 - 1.13 @@ -48,6 +48,9 @@ static int init_on_other_thread_is_done = JK_FALSE; static int init_on_other_thread_is_ok = JK_FALSE; +static const char ssl_cert_start[] = -BEGIN CERTIFICATE-\r\n; +static const char ssl_cert_end[] = \r\n-END CERTIFICATE-\r\n; + static jk_logger_t *logger = NULL; static jk_worker_env_t worker_env; @@ -400,8 +403,14 @@ s-ssl_key_size = -1; /* required by Servlet 2.3 Api, added in jtc */ if (s-is_ssl) { -s-ssl_cert = pblock_findval(auth-cert, private_data-rq-vars); -if (s-ssl_cert) { +char *ssl_cert = pblock_findval(auth-cert, private_data-rq-vars); +if (ssl_cert != NULL) { +s-ssl_cert = jk_pool_alloc(s-pool, sizeof(ssl_cert_start)+ + strlen(ssl_cert)+ + sizeof(ssl_cert_end)); +strcpy(s-ssl_cert, ssl_cert_start); +strcat(s-ssl_cert, ssl_cert); +strcat(s-ssl_cert, ssl_cert_end); s-ssl_cert_len = strlen(s-ssl_cert); } s-ssl_cipher = pblock_findval(cipher, private_data-sn-client); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads Expirer.java
billbarker2004/10/20 19:41:38 Modified:util/java/org/apache/tomcat/util/threads Expirer.java Log: Clean up references to TS when one is removed. Fix for Bug #31800 Submitted By: David Blavier [EMAIL PROTECTED] Revision ChangesPath 1.9 +6 -10 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java Index: Expirer.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/Expirer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Expirer.java 17 Sep 2004 18:34:19 - 1.8 +++ Expirer.java 21 Oct 2004 02:41:38 - 1.9 @@ -82,8 +82,9 @@ for( int i=0; i managedCount; i++ ) { if( ts == managedObjs[i] ) { synchronized( managedObjs ) { - managedObjs[ i ] = managedObjs[managedCount-1]; managedCount--; + managedObjs[ i ] = managedObjs[managedCount]; +managedObjs[managedCount] = null; } return; } @@ -117,7 +118,7 @@ public void runIt( Object td[] ) { long timeNow = System.currentTimeMillis(); - if( dL 2 ) debug( Checking + timeNow ); + if( log.isTraceEnabled() ) log.trace( Checking + timeNow ); int checkedCount; synchronized( managedObjs ) { checkedCount=managedCount; @@ -133,7 +134,7 @@ continue; long maxInactiveInterval = ts.getMaxInactiveInterval(); - if( dL 3 ) debug( TS: + maxInactiveInterval + + + if( log.isTraceEnabled() ) log.trace( TS: + maxInactiveInterval + + ts.getLastAccessedTime()); if (maxInactiveInterval 0) continue; @@ -142,8 +143,8 @@ if (timeIdle = maxInactiveInterval) { if( expireCallback != null ) { - if( dL 0 ) - debug( ts + + timeIdle + + + if( log.isDebugEnabled() ) + log.debug( ts + + timeIdle + + maxInactiveInterval ); expireCallback.expired( ts ); } @@ -151,9 +152,4 @@ } } -private static final int dL=0; -private void debug( String s ) { -if (log.isDebugEnabled()) -log.debug(Expirer: + s ); -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat RELEASE-NOTES-3.3.3.txt
billbarker2004/10/20 19:44:36 Modified:.RELEASE-NOTES-3.3.3.txt Log: Document fix to 31800 Revision ChangesPath 1.3 +3 -1 jakarta-tomcat/RELEASE-NOTES-3.3.3.txt Index: RELEASE-NOTES-3.3.3.txt === RCS file: /home/cvs/jakarta-tomcat/RELEASE-NOTES-3.3.3.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RELEASE-NOTES-3.3.3.txt 11 Oct 2004 00:13:34 - 1.2 +++ RELEASE-NOTES-3.3.3.txt 21 Oct 2004 02:44:36 - 1.3 @@ -28,6 +28,8 @@ 31474Fix the query-string that is passed by forwarded requests. +31800Clean up reference to Session when one is unmananged. + Jasper: Bug No. Description - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config PolicyInterceptor.java
billbarker2004/10/19 22:26:26 Modified:src/share/org/apache/tomcat/modules/config PolicyInterceptor.java Log: Allow compilation with a 1.5 JDK Revision ChangesPath 1.16 +2 -1 jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PolicyInterceptor.java Index: PolicyInterceptor.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PolicyInterceptor.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- PolicyInterceptor.java25 Feb 2004 07:06:59 - 1.15 +++ PolicyInterceptor.java20 Oct 2004 05:26:25 - 1.16 @@ -27,6 +27,7 @@ import java.security.Permissions; import java.security.Policy; import java.security.ProtectionDomain; +import java.security.cert.Certificate; import java.util.Enumeration; import java.util.PropertyPermission; @@ -199,7 +200,7 @@ try { File dir = new File(base); URL url = new URL(file: + dir.getAbsolutePath()); - CodeSource cs = new CodeSource(url,null); + CodeSource cs = new CodeSource(url,(Certificate [])null); /* We'll construct permissions for Jasper. Tomcat uses normal policy and URLClassLoader. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat build.xml
billbarker2004/10/19 22:29:55 Modified:.build.xml Log: Allow compilation with a 1.5 JDK. Note that setting compile.source=1.5 won't currently work, since there are still some enums floating around. Revision ChangesPath 1.205 +35 -7 jakarta-tomcat/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat/build.xml,v retrieving revision 1.204 retrieving revision 1.205 diff -u -r1.204 -r1.205 --- build.xml 6 Apr 2004 07:12:31 - 1.204 +++ build.xml 20 Oct 2004 05:29:54 - 1.205 @@ -23,6 +23,8 @@ property name=optimize value=false/ property name=debug value=on/ + property name=compile.target value=1.2 / + property name=compile.source value=${compile.target} / !-- Version properties -- property name=version value=3.3.3 / @@ -117,9 +119,6 @@ property name=commons-logging.lib location=${commons-logging.home} / property name=commons-logging.jar location=${commons-logging.lib}/commons-logging-api.jar / - property name=regexp.home location=${ws}/jakarta-regexp / - property name=regexp.jar location=${regexp.home}/jakarta-regexp.jar / - property name=commons-collections.home location=${jakarta-commons}/collections/ property name=commons-collections.lib location=${commons-collections.home}/dist/ property name=commons-collections.jar location=${commons-collections.lib}/commons-collections.jar/ @@ -433,7 +432,6 @@ property name=commons-logging.jar value=${commons-logging.jar}/ property name=commons-modeler.jar value=${commons-modeler.jar}/ property name=jmx.jar value=${jmx.jar}/ -property name=regexp.jar value=${regexp.jar} / /ant ant dir=${jtc.jk.home} target=build-jk @@ -448,7 +446,8 @@ target name=tomcat_util depends=prepare javac destdir=${tomcat.build}/classes -target=1.1 +target=${compile.target} + source=${compile.source} debug=${debug} optimize=${optimize} deprecation=off @@ -494,8 +493,6 @@ !-- Copy commons-logging-api.jar since tomcat-util depends on it -- copy todir=${tomcat.build}/lib/common file=${commons-logging.jar}/ -copy todir=${tomcat.build}/lib/container - file=${regexp.jar} / !-- All tomcat3 specific utils -- jar jarfile=${tomcat.build}/lib/container/container_util.jar @@ -513,7 +510,12 @@ debug=${debug} optimize=${optimize} deprecation=off + source=${compile.source} + target=${compile.target} srcdir=src/share + classpath +path refid=tomcat_util.class.path/ + /classpath !-- no dependencies -- include name=org/apache/tomcat/startup/Main.java/ include name=org/apache/tomcat/util/compat/**/ @@ -543,6 +545,8 @@ debug=${debug} optimize=${optimize} deprecation=off + source=${compile.source} + target=${compile.target} srcdir=src/share classpath pathelement location=${jtc.util.build}/classes/ @@ -575,6 +579,8 @@ debug=${debug} optimize=${optimize} deprecation=off + source=${compile.source} + target=${compile.target} srcdir=src/share classpath path refid=tomcat_util.class.path/ @@ -602,6 +608,8 @@ debug=${debug} optimize=${optimize} deprecation=off + source=${compile.source} + target=${compile.target} srcdir=src/share classpath path refid=xml-apis.class.path/ @@ -626,6 +634,8 @@ debug=${debug} optimize=${optimize} deprecation=off + source=${compile.source} + target=${compile.target} srcdir=src/facade22 classpath path refid=tomcat_util.class.path/ @@ -676,6 +686,8 @@ srcdir=src/share debug=${debug} optimize=${optimize} + source=${compile.source} + target=${compile.target} deprecation=off classpath path refid=tomcat_util.class.path/ @@ -744,6 +756,8 @@ srcdir=src/share debug=${debug} optimize=${optimize} + source=${compile.source} + target=${compile.target} deprecation=off classpath path refid=xml-apis.class.path/ @@ -794,6 +808,8 @@ target name=tomcat-ant depends=detect if=ant15-present delete dir=${tomcat.build}/ant / javac srcdir=src/share +target
cvs commit: jakarta-tomcat-catalina/webapps/admin/valve accessLogValve.jsp remoteAddrValve.jsp remoteHostValve.jsp requestDumperValve.jsp singleSignOnValve.jsp valves.jsp
billbarker2004/10/17 23:37:57 Modified:webapps/admin/WEB-INF struts-config.xml webapps/admin/WEB-INF/classes/org/apache/webapp/admin CommitChangesAction.java DumpRegistryAction.java DumpServerAction.java LogOutAction.java SetLocaleAction.java SetUpTreeAction.java TomcatTreeBuilder.java TreeControlTag.java TreeControlTestAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector AddConnectorAction.java DeleteConnectorAction.java DeleteConnectorsAction.java EditConnectorAction.java SaveConnectorAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context AddContextAction.java DeleteContextAction.java DeleteContextsAction.java EditContextAction.java SaveContextAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/host AddAliasAction.java AddHostAction.java DeleteAliasAction.java DeleteAliasesAction.java DeleteHostAction.java DeleteHostsAction.java EditHostAction.java SaveAliasAction.java SaveHostAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm AddRealmAction.java DeleteRealmAction.java DeleteRealmsAction.java EditRealmAction.java SaveDataSourceRealmAction.java SaveJDBCRealmAction.java SaveJNDIRealmAction.java SaveMemoryRealmAction.java SaveUserDatabaseRealmAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources DeleteDataSourcesAction.java DeleteEnvEntriesAction.java DeleteMailSessionsAction.java DeleteResourceLinksAction.java DeleteUserDatabasesAction.java ListDataSourcesAction.java ListEnvEntriesAction.java ListMailSessionsAction.java ListResourceLinksAction.java ListUserDatabasesAction.java ResourcesTreeBuilder.java SaveDataSourceAction.java SaveEnvEntryAction.java SaveMailSessionAction.java SaveResourceLinkAction.java SaveUserDatabaseAction.java SetUpDataSourceAction.java SetUpEnvEntryAction.java SetUpMailSessionAction.java SetUpResourceLinkAction.java SetUpUserDatabaseAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/server EditServerAction.java SaveServerAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service AddServiceAction.java DeleteServiceAction.java DeleteServicesAction.java EditServiceAction.java SaveServiceAction.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users DeleteGroupsAction.java DeleteRolesAction.java DeleteUsersAction.java GroupForm.java ListGroupsAction.java ListRolesAction.java ListUsersAction.java SaveGroupAction.java SaveRoleAction.java SaveUserAction.java SetUpGroupAction.java SetUpRoleAction.java SetUpUserAction.java UserForm.java UsersTreeBuilder.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve AddValveAction.java DeleteValveAction.java DeleteValvesAction.java EditValveAction.java SaveAccessLogValveAction.java SaveRemoteAddrValveAction.java SaveRemoteHostValveAction.java SaveRequestDumperValveAction.java SaveSingleSignOnValveAction.java ValveUtil.java webapps/admin/connector connector.jsp connectors.jsp webapps/admin/context context.jsp contexts.jsp webapps/admin/host host.jsp hosts.jsp webapps/admin/realm dataSourceRealm.jsp jdbcRealm.jsp jndiRealm.jsp memoryRealm.jsp realms.jsp userDatabaseRealm.jsp webapps/admin/resources dataSource.jsp dataSources.jspf envEntries.jspf envEntry.jsp listDataSources.jspf
cvs commit: jakarta-tomcat-5 build.properties.default
billbarker2004/10/17 23:45:00 Modified:.build.properties.default Log: Update to struts-1.2.4 Revision ChangesPath 1.138 +4 -4 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.137 retrieving revision 1.138 diff -u -r1.137 -r1.138 --- build.properties.default 5 Oct 2004 14:01:52 - 1.137 +++ build.properties.default 18 Oct 2004 06:45:00 - 1.138 @@ -205,11 +205,11 @@ nsis.loc=${base-sf.loc}/nsis/nsis20.exe -# - Struts, version 1.1 or later - -struts.home=${base.path}/jakarta-struts-1.1 +# - Struts, version 1.2.4 or later - +struts.home=${base.path}/jakarta-struts-1.2.4 struts.lib=${struts.home}/lib struts.jar=${struts.lib}/struts.jar -struts.loc=${base-jakarta.loc}/struts/binaries/jakarta-struts-1.1.tar.gz +struts.loc=${base-jakarta.loc}/../struts/binaries/jakarta-struts-1.2.4.tar.gz # -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java
billbarker2004/10/14 21:42:25 Modified:jk/java/org/apache/jk/common ChannelJni.java Log: Make the message properly empty for the first part of the POST body. This is a bit ugly, but then so is the rest of ChannelJni ;-). Fix for Bug #31722 Revision ChangesPath 1.18 +2 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java Index: ChannelJni.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ChannelJni.java 31 May 2004 04:48:54 - 1.17 +++ ChannelJni.java 15 Oct 2004 04:42:25 - 1.18 @@ -71,7 +71,8 @@ log.debug(No send() prior to receive(), no data buffer); // No sent() was done prior to receive. msg.reset(); -return 0; +msg.end(); +sentResponse = msg; } sentResponse.processHeader(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk build.xml
billbarker2004/10/11 23:57:34 Modified:jk build.xml Log: Oops, missed one place. Revision ChangesPath 1.78 +4 -4 jakarta-tomcat-connectors/jk/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- build.xml 12 Oct 2004 03:42:22 - 1.77 +++ build.xml 12 Oct 2004 06:57:33 - 1.78 @@ -106,17 +106,17 @@ target name=detect echo message= jakarta-tomcat-connectors / available property=tomcat33.detect - file=${tomcat33.home}/lib/common/tomcat_core.jar / + file=${tc3-core.jar} / available property=tomcat40.detect - file=${tomcat40.home}/server/lib/catalina.jar / + file=${tc4-catalina.jar} / available property=tomcat41.detect file=${tomcat41.home}/server/webapps / condition property=tomcat5.detect and available classname=javax.servlet.ServletRequestEvent - classpath=${tomcat5.home}/common/lib/servlet-api.jar -/ + classpath=${servlet-api.jar} / +available file=${tc5-catalina.jar} / /and /condition available property=apache13.detect - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk build.xml
billbarker2004/10/11 20:42:22 Modified:jk build.xml Log: Splitting out version targets, as part of Gump cleanup. Shouldn't effect 'normal' builds at all. Revision ChangesPath 1.77 +127 -53 jakarta-tomcat-connectors/jk/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- build.xml 29 Aug 2004 18:14:17 - 1.76 +++ build.xml 12 Oct 2004 03:42:22 - 1.77 @@ -23,6 +23,12 @@ property name=compile.debug value=true / property name=compile.deprecation value=false / +property name=tomcat-jk.jar value=${jk.build}/lib/tomcat-jk.jar / +property name=tomcat-jkconfig.jar value=${jk.build}/lib/jkconfig.jar / +property name=tomcat-jkshm.jar value=${jk.build}/lib/jkshm.jar / +property name=tomcat-jk2.jar value=${jk.build}/lib/tomcat-jk2.jar / +property name=tomcat-jni.jar value=${jk.build}/lib/tomcat-jni.jar / + !-- default locations, overrident by properties -- property name=base.path location=/usr/share/java/ @@ -36,10 +42,17 @@ location=../../jakarta-tomcat-catalina/build / property name=coyote.home location=../coyote/build / +property name=tomcat-util.home location=../util/build / property name=tomcat-coyote.jar location=${coyote.home}/lib/tomcat-coyote.jar / property name=servlet-api.jar location=${tomcat5.home}/common/lib/servlet-api.jar / -property name=tomcat-util.jar location=../util/build/lib/tomcat-util.jar / +property name=tomcat-util.jar location=${tomcat-util.home}/lib/tomcat-util.jar / +property name=tc4-catalina.jar location=${tomcat41.home}/server/lib/catalina.jar / +property name=tc5-catalina.jar location=${tomcat5.home}/server/lib/catalina.jar / +property name=tc3-core.jar location=${tomcat33.home}/lib/common/tomcat_core.jar / +property name=tc3-core_util.jar location=${tomcat33.home}/lib/common/core_util.jar / +property name=tc3-util.jar location=${tomcat33.home}/lib/container/tomcat_util.jar / +property name=tc3-modules.jar location=${tomcat33.home}/lib/container/tomcat_modules.jar / property name=commons-modeler.jar location=../../jakarta-commons/modeler/dist/commons-modeler.jar / !-- Fix build via ECLIPSE which didn't export ant's jars -- @@ -52,26 +65,29 @@ path id=build-main.classpath pathelement location=../util/build/classes/ -pathelement location=${tomcat5.home}/server/lib/catalina.jar/ -pathelement location=${tomcat41.home}/server/lib/catalina.jar/ -pathelement location=${tomcat40.home}/server/lib/catalina.jar/ -pathelement location=${tomcat33.home}/lib/common/tomcat_core.jar/ -pathelement location=${tomcat33.home}/lib/common/core_util.jar/ pathelement location=${servlet-api.jar}/ pathelement location=${tomcat-util.jar} / pathelement location=${commons-logging.jar}/ pathelement location=${commons-modeler.jar}/ pathelement location=${jmx.jar}/ -pathelement location=${tomcat33.home}/lib/container/tomcat_modules.jar/ -!-- this is needed - otherwise tomcat33 connector will not compile. -Just change tomcat33.home in build.properties to point -to nowhere, and tomcat_util will no longer be visible, nor -3.3 classes. -- -pathelement - location=${tomcat33.home}/lib/container/tomcat_util.jar/ pathelement location=${tomcat-coyote.jar}/ /path - + +path id=build-tc4.classpath +pathelement location=${tc4-catalina.jar} / +pathelement location=${servlet-api.jar} / +/path +path id=build-tc5.classpath +pathelement location=${tc5-catalina.jar} / +pathelement location=${servlet-api.jar} / +/path +path id=build-tc3.classpath + pathelement location=${tc3-core.jar} / + pathelement location=${tc3-core_util.jar} / + pathelement location=${tc3-util.jar} / + pathelement location=${tc3-modules.jar} / + pathelement location=${servlet-api.jar} / + /path !-- Detection and reports -- target name=report @@ -166,65 +182,42 @@ depends=prepare,report,jkjava / !-- Building -- - -target name=jkjava -description=Build java side of the connector +target name=jkjava-static depends=prepare,report + !-- Copy static resource files -- + copy todir=${jk.build}/classes + fileset dir=java + include name=**/*.properties
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/server JkMain.java
billbarker2004/10/10 16:43:20 Modified:jk/java/org/apache/jk/server JkMain.java Log: Make the 'jk2.properties' file entirely optional. By default, no properties file is read. Configuration should be done on the Connector element. To get the previous behavior, you need to have: Connector protocol=AJP/1.3 propertiesFile=conf/jk2.properties / Revision ChangesPath 1.47 +44 -24 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.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- JkMain.java 24 Feb 2004 08:48:41 - 1.46 +++ JkMain.java 10 Oct 2004 23:43:20 - 1.47 @@ -115,7 +115,7 @@ } System.setProperty(java.protocol.handler.pkgs, value); } catch(Exception ex ) { -ex.printStackTrace(); +log.info(Error adding SSL Protocol Handler,ex); } } @@ -126,10 +126,8 @@ */ public void setPropertiesFile( String p ) { propFile=p; -try { -props.load( new FileInputStream(propFile) ); -} catch(IOException ex ){ -ex.printStackTrace(); +if( started ) { +loadPropertiesFile(); } } @@ -147,6 +145,9 @@ if( jkHome.equals( n ) ) { setJkHome( v ); } +if( propertiesFile.equals( n ) ) { +setPropertiesFile( v ); +} props.put( n, v ); if( started ) { processProperty( n, v ); @@ -248,23 +249,10 @@ if( home==null ) { log.info( Can't find home, jk2.properties not loaded); } -if( home != null ) { -File hF=new File(home); -File conf=new File( home, conf ); -if( ! conf.exists() ) -conf=new File( home, etc ); +if(log.isDebugEnabled()) +log.debug(Starting Jk2, base dir= + home ); +loadPropertiesFile(); -propsF=new File( conf, jk2.properties ); - -if( propsF.exists() ) { -log.debug(Starting Jk2, base dir= + home + conf= + propsF ); -setPropertiesFile( propsF.getAbsolutePath()); -} else { -log.debug(Starting Jk2, base dir= + home ); -if( log.isDebugEnabled() ) -log.debug( No properties file found + propsF ); -} -} String initHTTPS = (String)props.get(class.initHTTPS); if(true.equalsIgnoreCase(initHTTPS)) { initHTTPSUrls(); @@ -435,22 +423,54 @@ jkMain.init(); jkMain.start(); } catch( Exception ex ) { -ex.printStackTrace(); +log.warn(Error running,ex); } } // Private methods + +private boolean checkPropertiesFile() { +if(propFile == null) { +return false; +} +propsF = new File(propFile); +if(!propsF.isAbsolute()) { +String home = getWorkerEnv().getJkHome(); +if( home == null ) { +return false; +} +propsF = new File(home, propFile); +} +return propsF.exists(); +} + +private void loadPropertiesFile() { +if(!checkPropertiesFile()) { +return; +} + +try { +props.load( new FileInputStream(propsF) ); +} catch(IOException ex ){ +log.warn(Unable to load properties from +propsF,ex); +} +} + public void saveProperties() { if( !saveProperties) return; +if(propsF == null) { +log.warn(No properties file specified. Unable to save); +return; +} // Temp - to check if it works -String outFile=propFile + .save; +File outFile= new File(propsF.getParentFile(), propsF.getName()+.save); log.debug(Saving properties + outFile ); try { props.save( new FileOutputStream(outFile), AUTOMATICALLY GENERATED ); } catch(IOException ex ){ -ex.printStackTrace(); +log.warn(Unable to save to +outFile,ex); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa RealmBase.java
billbarker2004/10/07 19:53:38 Modified:src/share/org/apache/tomcat/modules/aaa RealmBase.java Log: Add the option to specify the encoding for use in digesting passwords. To use, specify the attribute digestEncoding=UTF-8 on your Realm element. Fix for Bug #31592 Revision ChangesPath 1.5 +35 -7 jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/RealmBase.java Index: RealmBase.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/RealmBase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RealmBase.java25 Feb 2004 06:52:40 - 1.4 +++ RealmBase.java8 Oct 2004 02:53:38 - 1.5 @@ -21,6 +21,7 @@ package org.apache.tomcat.modules.aaa; +import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.Principal; @@ -68,6 +69,11 @@ protected String digest = No; /** + * The encoding to use for password digesting. + */ +protected String digestEncoding=null; + +/** * Gets the digest algorithm used for credentials in the database. * Should be a value that MessageDigest accepts for algorithm or No. * No is the Default. @@ -88,18 +94,40 @@ } /** + * Get the encoding to use for digesting passwords. + * If codenull/code then the System encoding is used. + */ +public String getDigestEncoding() { + return digestEncoding; +} + +/** + * Set the encoding to use for digesting passwords. + * if codenull/code then the System encoding is used. + */ +public void setDigestEncoding(String de) { + digestEncoding = de; +} + +/** * Digest password using the algorithm especificied and * convert the result to a corresponding hex string. * If exception, the plain credentials string is returned * @param credentials Password or other credentials to use in authenticating this username * @param algorithm Algorithm used to do the digest */ -public static final String digest(String credentials,String algorithm ) { +public static final String digest(String credentials,String algorithm, String encoding ) { try { // Obtain a new message digest with MD5 encryption MessageDigest md = (MessageDigest)MessageDigest.getInstance(algorithm).clone(); // encode the credentials -md.update(credentials.getBytes()); + byte [] credBytes = null; + if(encoding != null) { + credBytes = credentials.getBytes(encoding); + } else { + credBytes = credentials.getBytes(); + } +md.update(credBytes); // obtain the byte array from the digest byte[] dig = md.digest(); // convert the byte array to hex string @@ -121,7 +149,7 @@ if (args[0].equalsIgnoreCase(-a)) { for (int i = 2; i args.length; i++) { System.out.print(args[i] + :); -System.out.println(digest(args[i], args[1])); +System.out.println(digest(args[i], args[1], null)); } } } @@ -135,7 +163,7 @@ if( digest.equals() || digest.equalsIgnoreCase(No)){ return credentials; } else { -return digest(credentials,digest); +return digest(credentials,digest, digestEncoding); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor2.java
billbarker2004/10/04 21:45:55 Modified:coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor2.java Log: The translation of HTTP/1.1 attribute names is now the responsibility of the Connector. Revision ChangesPath 1.20 +23 -1 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java Index: CoyoteInterceptor2.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor2.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- CoyoteInterceptor2.java 26 Feb 2004 06:00:27 - 1.19 +++ CoyoteInterceptor2.java 5 Oct 2004 04:45:55 - 1.20 @@ -101,7 +101,7 @@ Hashtable attributes=new Hashtable(); public void setAttribute( String prop, Object value) { - attributes.put( prop, value ); + attributes.put( translateAttributeName(prop), value ); } @@ -253,5 +253,27 @@ SSLSupport.CERTIFICATE_KEY.equals(key) || SSLSupport.SESSION_ID_KEY.equals(key); } + +private String translateAttributeName(String name) { + if (clientAuth.equals(name)) { + return clientauth; + } else if (keystoreFile.equals(name)) { + return keystore; + } else if (randomFile.equals(name)) { + return randomfile; + } else if (rootFile.equals(name)) { + return rootfile; + } else if (keystorePass.equals(name)) { + return keypass; + } else if (keystoreType.equals(name)) { + return keytype; + } else if (sslProtocol.equals(name)) { + return protocol; + } else if (sslProtocols.equals(name)) { + return protocols; + } + return name; +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers CoyoteMapper.java
billbarker2004/10/03 11:01:52 Modified:src/share/org/apache/tomcat/core Request.java src/share/org/apache/tomcat/modules/mappers CoyoteMapper.java Log: Integrate the MappingData with the Request. Revision ChangesPath 1.120 +11 -1 jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Request.java,v retrieving revision 1.119 retrieving revision 1.120 diff -u -r1.119 -r1.120 --- Request.java 25 Feb 2004 06:45:07 - 1.119 +++ Request.java 3 Oct 2004 18:01:52 - 1.120 @@ -30,6 +30,7 @@ import org.apache.tomcat.util.http.Cookies; import org.apache.tomcat.util.http.MimeHeaders; import org.apache.tomcat.util.http.Parameters; +import org.apache.tomcat.util.http.mapper.MappingData; /** * This is a low-level, efficient representation of a server request. Most fields @@ -155,6 +156,7 @@ protected ContextManager contextM; protected Context context; protected Object requestFacade; +protected MappingData mappingData = null; // Session protected String reqSessionId; @@ -352,6 +354,14 @@ this.localHost = host; } +public MappingData getMappingData() { + if(mappingData == null) { + mappingData = new MappingData(); + mappingData.wrapperPath = servletPathMB; + mappingData.pathInfo = pathInfoMB; + } + return mappingData; +} // Parameters @@ -1045,7 +1055,7 @@ scookies.recycle(); for( int i=0; iContextManager.MAX_NOTES; i++ ) notes[i]=null; - + // sub-req parent=null; child=null; 1.2 +7 -7 jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/CoyoteMapper.java Index: CoyoteMapper.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/CoyoteMapper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CoyoteMapper.java 22 Aug 2004 23:49:20 - 1.1 +++ CoyoteMapper.java 3 Oct 2004 18:01:52 - 1.2 @@ -56,8 +56,8 @@ public class CoyoteMapper extends BaseInterceptor { public static final String DEFAULT_HOST = DEFAULT; -Mapper map; -Hashtable hostData = new Hashtable(); +private Mapper map; +private Hashtable hostData = new Hashtable(); public CoyoteMapper() { } @@ -190,13 +190,13 @@ // This is a sub-request for the default host. hostMB.setString(DEFAULT_HOST); } - MappingData mdata = new MappingData(); - mdata.wrapperPath = req.servletPath(); - mdata.pathInfo = req.pathInfo(); + MappingData mdata = req.getMappingData(); + mdata.recycle(); try { map.map(hostMB, pathMB, mdata); } catch(Exception ex) { log(Error mapping +pathMB,ex); + req.getResponse().setErrorException(ex); return 500; } if(mdata.context != null) { @@ -206,9 +206,9 @@ req.setContainer( container ); if(!mdata.redirectPath.isNull()) { Response res = req.getResponse(); - if(debug 0) + if(debug 9) log(Redirecting '+req+' to '+ - mdata.redirectPath+', new Exception()); + mdata.redirectPath+'); res.setHeader(Location, mdata.redirectPath.toString()); return 302; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Main.java
billbarker2004/10/02 13:29:21 Modified:src/share/org/apache/tomcat/startup Main.java Log: Set the ContextCL before loading loading EmbededTomcat. EmbededTomcat will reset it, but this seems to make log4j configuration easier. Revision ChangesPath 1.46 +2 -1 jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java Index: Main.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- Main.java 25 Feb 2004 07:25:48 - 1.45 +++ Main.java 2 Oct 2004 20:29:21 - 1.46 @@ -256,6 +256,7 @@ initSecurityFile(); initClassLoader(); + jdk11Compat.setContextClassLoader(commonCL); Class cls=commonCL.loadClass((String)tasks.get(task)); Object proxy=cls.newInstance(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server PoolTcpConnector.java
billbarker2004/10/01 18:22:10 Modified:src/share/org/apache/tomcat/modules/server PoolTcpConnector.java Log: For backwards compatability, default the strategy to leader/follower. Revision ChangesPath 1.19 +1 -3 jakarta-tomcat/src/share/org/apache/tomcat/modules/server/PoolTcpConnector.java Index: PoolTcpConnector.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/PoolTcpConnector.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- PoolTcpConnector.java 25 Feb 2004 07:18:35 - 1.18 +++ PoolTcpConnector.java 2 Oct 2004 01:22:10 - 1.19 @@ -58,6 +58,7 @@ public PoolTcpConnector() { ep = new PoolTcpEndpoint(); + ep.setStrategy(lf); } // Start/stop @@ -107,9 +108,6 @@ // Pool setup -public void setPools( boolean t ) { - ep.setPoolOn(t); -} public void setMaxThreads( int maxThreads ) { ep.setMaxThreads(maxThreads); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade RequestDispatcherImpl.java
billbarker2004/09/29 23:02:39 Modified:src/facade22/org/apache/tomcat/facade RequestDispatcherImpl.java Log: Set the correct query-string on forwards. The parameters are the sum of the forward URI and the request URI, but the query-string is the one from the forward URI according to the spec. This still needs some work to handle the post-request clean-up. Fix for Bug #31474 Reported By: Marc Daniels [EMAIL PROTECTED] Revision ChangesPath 1.29 +7 -5 jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java Index: RequestDispatcherImpl.java === RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- RequestDispatcherImpl.java23 Feb 2004 06:06:13 - 1.28 +++ RequestDispatcherImpl.java30 Sep 2004 06:02:39 - 1.29 @@ -193,7 +193,7 @@ //realRequest.query().recycle(); realRequest.servletPath().recycle(); realRequest.pathInfo().recycle(); -realRequest.setChild(null); + realRequest.setChild(null); // merge query string as specified in specs - before, it may affect // the way the request is handled by special interceptors @@ -201,11 +201,11 @@ // Process existing parameters, if not already done so // ( otherwise we'll process some twice ) realRequest.parameters().handleQueryParameters(); - // Set the query string - the sum of the new one and old one. + // Set the query string - the new one. String oldQS=realRequest.queryString().toString(); - String newQS=(oldQS==null ) ? queryString : queryString + + - oldQS; - realRequest.queryString().setString(newQS); + // String newQS=(oldQS==null ) ? queryString : queryString + + + // oldQS; + realRequest.queryString().setString(queryString); // Process the additional parsm. We don't know if the old // params were processed ( so we need to make sure they are, @@ -215,6 +215,8 @@ child.processParameters( queryString ); //realRequest.parameters().processParameters( queryString ); + } else { + realRequest.queryString().recycle(); } // run the new request through the context manager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/config BaseJkConfig.java
billbarker2004/09/21 19:54:06 Modified:jk/java/org/apache/ajp NegociationHandler.java jk/java/org/apache/ajp/tomcat4 JkServlet.java jk/java/org/apache/ajp/tomcat4/config BaseJkConfig.java Log: Fix broken logging. Revision ChangesPath 1.10 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/ajp/NegociationHandler.java Index: NegociationHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/NegociationHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- NegociationHandler.java 17 Sep 2004 18:34:18 - 1.9 +++ NegociationHandler.java 22 Sep 2004 02:54:06 - 1.10 @@ -528,6 +528,6 @@ private static int debug=10; void log(String s) { if (log.isDebugEnabled()) - log.ebug(Ajp14Negotiation: + s ); + log.debug(Ajp14Negotiation: + s ); } } 1.6 +1 -1 jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/JkServlet.java Index: JkServlet.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/JkServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JkServlet.java17 Sep 2004 21:57:54 - 1.5 +++ JkServlet.java22 Sep 2004 02:54:06 - 1.6 @@ -87,7 +87,7 @@ } private static final int dL=10; -private static void d(String s ) { +private void d(String s ) { log( JkServlet: + s ); } 1.8 +5 -1 jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/config/BaseJkConfig.java Index: BaseJkConfig.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat4/config/BaseJkConfig.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- BaseJkConfig.java 17 Sep 2004 21:57:54 - 1.7 +++ BaseJkConfig.java 22 Sep 2004 02:54:06 - 1.8 @@ -483,4 +483,8 @@ return false; } + +protected void log(String msg) { +log.info(msg); +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelSocket.java
billbarker2004/09/16 21:08:53 Modified:jk/java/org/apache/jk/common ChannelSocket.java Log: Not all exceptions have a message Revision ChangesPath 1.48 +4 -4 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java Index: ChannelSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- ChannelSocket.java5 Jun 2004 05:51:30 - 1.47 +++ ChannelSocket.java17 Sep 2004 04:08:53 - 1.48 @@ -679,14 +679,14 @@ } } } catch( Exception ex ) { -if( ex.getMessage().indexOf( Connection reset ) = 0) +String msg = ex.getMessage(); +if( msg != null msg.indexOf( Connection reset ) = 0) log.debug( Server has been restarted or reset this connection); -else if (ex.getMessage().indexOf( Read timed out ) =0 ) +else if (msg != null msg.indexOf( Read timed out ) =0 ) log.info( connection timeout reached); else log.error( Error, processing connection, ex); -} -finally { +} finally { /* * Whatever happened to this connection (remote closed it, timeout, read error) * the socket SHOULD be closed, or we may be in situation where the webserver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java
billbarker2004/09/16 21:50:48 Modified:jk/java/org/apache/jk/common HandlerRequest.java Log: Require that use of AJP/1.3 shutdown is explictly enabled to function. No Adapter in any version of Tomcat currently supports a clean shutdown from AJP/1.3, so it is better to turn it off (by default) for now. Fix for Bug #31204 Revision ChangesPath 1.39 +25 -6 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- HandlerRequest.java 15 Jun 2004 20:37:11 - 1.38 +++ HandlerRequest.java 17 Sep 2004 04:50:47 - 1.39 @@ -251,6 +251,14 @@ return tomcatAuthentication; } +public void setShutdownEnabled(boolean se) { +shutdownEnabled = se; +} + +public boolean getShutdownEnabled() { +return shutdownEnabled; +} + public void setTomcatAuthentication(boolean newTomcatAuthentication) { tomcatAuthentication = newTomcatAuthentication; } @@ -324,6 +332,7 @@ boolean decoded=true; boolean tomcatAuthentication=true; boolean registerRequests=true; +boolean shutdownEnabled=false; public int invoke(Msg msg, MsgContext ep ) throws IOException @@ -399,9 +408,14 @@ if( !ch.isSameAddress(ep) ) { log.error(Shutdown request not from 'same address' ); return ERROR; - } +} +if( !shutdownEnabled ) { +log.warn(Ignoring shutdown request: shutdown not enabled); +return ERROR; +} // forward to the default handler - it'll do the shutdown +checkRequest(ep); next.invoke( msg, ep ); log.info(Exiting); @@ -429,10 +443,7 @@ static int count = 0; -private int decodeRequest( Msg msg, MsgContext ep, MessageBytes tmpMB ) -throws IOException -{ -// FORWARD_REQUEST handler +private Request checkRequest(MsgContext ep) { Request req=(Request)ep.getRequest(); if( req==null ) { req=new Request(); @@ -440,9 +451,17 @@ req.setResponse(res); ep.setRequest( req ); if( registerRequests ) { - ep.getSource().registerRequest(req, ep, count++); +ep.getSource().registerRequest(req, ep, count++); } } +return req; +} + +private int decodeRequest( Msg msg, MsgContext ep, MessageBytes tmpMB ) +throws IOException +{ +// FORWARD_REQUEST handler +Request req = checkRequest(ep); RequestInfo rp = req.getRequestProcessor(); rp.setStage(Constants.STAGE_PARSE); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat RELEASE-NOTES-3.3.3.txt
billbarker2004/09/16 22:57:52 Added: .RELEASE-NOTES-3.3.3.txt Log: Better late than never ;-). Revision ChangesPath 1.1 jakarta-tomcat/RELEASE-NOTES-3.3.3.txt Index: RELEASE-NOTES-3.3.3.txt === Apache Tomcat 3.3.3 === Release Notes = $Id: RELEASE-NOTES-3.3.3.txt,v 1.1 2004/09/17 05:57:52 billbarker Exp $ This document describes the changes that have been made since the release of Tomcat 3.3.2 Final. = Bug Fixes = The release in which the fix appears is indicated in brackets. Feature Additions: Bug No. Description Added the CoyoteMapper which uses the j-t-c mapper to map requests. Potential replacement for SimpleMapper1. Server: Bug No. Description Jasper: Bug No. Description Configuration: Bug No. Description Connectors: Bug No. Description Disable the use of AJP/1.3 shutdown in the CoyoteConnector by default (at least until it is supported). Documentation: Bug No. Description - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/etc server.xml
billbarker2004/09/01 23:18:10 Modified:src/etc server.xml Log: Note that the CoyoteConnector now requires a 1.4 JVM. Revision ChangesPath 1.104 +1 -1 jakarta-tomcat/src/etc/server.xml Index: server.xml === RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- server.xml27 Feb 2004 05:45:47 - 1.103 +++ server.xml2 Sep 2004 06:18:10 - 1.104 @@ -201,7 +201,7 @@ by default report Tomcat Web Server ... set an empty string to avoid sending server header -- -!-- Uncomment this if useing a 1.1 JDK +!-- Uncomment this if using a 1.3 or lower JDK Http10Connector port=8080 secure=false maxThreads=100 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java
billbarker2004/09/02 21:28:40 Modified:jk/java/org/apache/jk/common JkMX.java Log: Allow the mx4j HttpAdaptor to be configured for authentication. Submitted By: Rainer Jung [EMAIL PROTECTED] Revision ChangesPath 1.25 +48 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java Index: JkMX.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- JkMX.java 30 Aug 2004 16:00:06 - 1.24 +++ JkMX.java 3 Sep 2004 04:28:39 - 1.25 @@ -46,6 +46,9 @@ private boolean enabled=false; private int httpport=-1; private String httphost=localhost; +private String authmode=none; +private String authuser=null; +private String authpassword=null; private int jrmpport=-1; private String jrmphost=localhost; private boolean useXSLTProcessor = true; @@ -93,6 +96,30 @@ return httphost; } +public void setAuthMode(String mode) { +authmode=mode; +} + +public String getAuthMode() { +return authmode; +} + +public void setAuthUser(String user) { +authuser=user; +} + +public String getAuthUser() { +return authuser; +} + +public void setAuthPassword(String password) { +authpassword=password; +} + +public String getAuthPassword() { +return authpassword; +} + /** Enable the MX4J JRMP internal adapter */ public void setJrmpPort( int i ) { @@ -140,6 +167,16 @@ mserver.setAttribute(httpServerName, new Attribute(Host, httphost)); mserver.setAttribute(httpServerName, new Attribute(Port, new Integer(httpport))); +if( none.equals(authmode) || basic.equals(authmode) || digest.equals(authmode) ) +mserver.setAttribute(httpServerName, new Attribute(AuthenticationMethod, authmode)); + +if( authuser!=null authpassword!=null ) +mserver.invoke(httpServerName, addAuthorization, +new Object[] { +authuser, +authpassword}, +new String[] { java.lang.String, java.lang.String }); + if(useXSLTProcessor) { ObjectName processorName = registerObject(mx4j.adaptor.http.XSLTProcessor, Http:name=XSLTProcessor); @@ -169,7 +206,17 @@ mserver.setAttribute(httpServerName, new Attribute(Host, httphost)); mserver.setAttribute(httpServerName, new Attribute(Port, new Integer(httpport))); -if(useXSLTProcessor) { +if( none.equals(authmode) || basic.equals(authmode) || digest.equals(authmode) ) +mserver.setAttribute(httpServerName, new Attribute(AuthenticationMethod, authmode)); + +if( authuser!=null authpassword!=null ) +mserver.invoke(httpServerName, addAuthorization, +new Object[] { +authuser, +authpassword}, +new String[] { java.lang.String, java.lang.String }); + + if(useXSLTProcessor) { ObjectName processorName = registerObject(mx4j.tools.adaptor.http.XSLTProcessor, Http:name=XSLTProcessor); mserver.setAttribute(httpServerName, new Attribute(ProcessorName, processorName)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf MessageBytes.java
billbarker2004/08/22 14:46:20 Modified:util/java/org/apache/tomcat/util/buf MessageBytes.java Log: The type has to be changed after the call to toString, or conversion isn't done correctly. Revision ChangesPath 1.18 +4 -2 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/MessageBytes.java Index: MessageBytes.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/MessageBytes.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- MessageBytes.java 18 Aug 2004 20:42:25 - 1.17 +++ MessageBytes.java 22 Aug 2004 21:46:19 - 1.18 @@ -230,11 +230,12 @@ /** Unimplemented yet. Do a char-byte conversion. */ public void toBytes() { -type=T_BYTES; if( ! byteC.isNull() ) { +type=T_BYTES; return; } toString(); +type=T_BYTES; byte bb[] = strValue.getBytes(); byteC.setBytes(bb, 0, bb.length); } @@ -243,12 +244,13 @@ * XXX Not optimized - it converts to String first. */ public void toChars() { -type=T_CHARS; if( ! charC.isNull() ) { +type=T_CHARS; return; } // inefficient toString(); +type=T_CHARS; char cc[]=strValue.toCharArray(); charC.setChars(cc, 0, cc.length); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]