svn commit: r307085 - /tomcat/build/tc5.5.x/build.xml
Author: remm Date: Fri Oct 7 03:59:01 2005 New Revision: 307085 URL: http://svn.apache.org/viewcvs?rev=307085&view=rev Log: - Update source locations. Modified: tomcat/build/tc5.5.x/build.xml Modified: tomcat/build/tc5.5.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.xml?rev=307085&r1=307084&r2=307085&view=diff == --- tomcat/build/tc5.5.x/build.xml (original) +++ tomcat/build/tc5.5.x/build.xml Fri Oct 7 03:59:01 2005 @@ -25,11 +25,11 @@ - - - - - + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r307071 - /tomcat/build/tc5.5.x/build.properties.default
Author: remm Date: Fri Oct 7 03:13:20 2005 New Revision: 307071 URL: http://svn.apache.org/viewcvs?rev=307071&view=rev Log: - Update to Eclipse JDT 3.1.1 (ok, it's a test commit). Modified: tomcat/build/tc5.5.x/build.properties.default Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=307071&r1=307070&r2=307071&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Fri Oct 7 03:13:20 2005 @@ -142,11 +142,11 @@ xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.1.tar.gz -# - Eclipse JDT, version 3.1.0 or later - +# - Eclipse JDT, version 3.1.1 or later - jdt.home=${base.path}/eclipse/plugins jdt.lib=${jdt.home} -jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.0.jar -jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1-200506271435/eclipse-JDT-3.1.zip +jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.1.jar +jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-JDT-3.1.1.zip # - Tomcat native library - - 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 CoyoteAdapter.java
remm2005/09/22 10:20:21 Modified:webapps/docs changelog.xml catalina/src/share/org/apache/catalina/connector CoyoteAdapter.java Log: - 34749: jsessionid dropped on trailing slash (/) redirect. Revision ChangesPath 1.379 +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.378 retrieving revision 1.379 diff -u -r1.378 -r1.379 --- changelog.xml 22 Sep 2005 14:21:18 - 1.378 +++ changelog.xml 22 Sep 2005 17:20:21 - 1.379 @@ -70,6 +70,9 @@ 35609: service.bat echo command when wrong arguments given [patch by Robert Longson] (yoavs) + +34749: jsessionid dropped on trailing slash (/) redirect (remm) + 1.10 +7 -1 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- CoyoteAdapter.java30 Apr 2005 03:32:43 - 1.9 +++ CoyoteAdapter.java22 Sep 2005 17:20:21 - 1.10 @@ -305,6 +305,12 @@ if (!redirectPathMB.isNull()) { String redirectPath = redirectPathMB.toString(); String query = request.getQueryString(); +if (request.isRequestedSessionIdFromURL()) { +// This is not optimal, but as this is not very common, it +// shouldn't matter +redirectPath = redirectPath + ";jsessionid=" ++ request.getRequestedSessionId(); +} if (query != null) { // This is not optimal, but as this is not very common, it // shouldn't matter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.xml
remm2005/09/22 03:39:37 Modified:.build.xml Log: - Fix build by excluding tagPlugins.xml. - This file shouldn't be in the standard examples, but rather copied there before precompiling (once it works again, of course). Revision ChangesPath 1.238 +3 -1 jakarta-tomcat-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v retrieving revision 1.237 retrieving revision 1.238 diff -u -r1.237 -r1.238 --- build.xml 1 Sep 2005 18:28:24 - 1.237 +++ build.xml 22 Sep 2005 10:39:37 - 1.238 @@ -779,7 +779,9 @@ - + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/tagplugins/jstl/core - New directory
remm2005/09/20 03:56:41 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/tagplugins/jstl/core - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/09/19 04:35:50 Modified:catalina/src/share/org/apache/catalina/session StandardSession.java webapps/docs changelog.xml Log: - 36541: Full syncs using a Hashtable for session attributes, as mandated in the next specification. Revision ChangesPath 1.61 +11 -20 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.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- StandardSession.java 16 Jun 2005 09:50:12 - 1.60 +++ StandardSession.java 19 Sep 2005 11:35:49 - 1.61 @@ -31,7 +31,9 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; +import java.util.Hashtable; import java.util.Iterator; +import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.http.HttpSession; @@ -115,7 +117,7 @@ /** * The collection of user data attributes associated with this Session. */ -protected HashMap attributes = new HashMap(); +protected Map attributes = new Hashtable(); /** @@ -229,7 +231,7 @@ * and event listeners. IMPLEMENTATION NOTE: This object is * not saved and restored across session serializations! */ -protected transient HashMap notes = new HashMap(); +protected transient Map notes = new Hashtable(); /** @@ -1266,10 +1268,7 @@ } // Replace or add this attribute -Object unbound = null; -synchronized (attributes) { -unbound = attributes.put(name, value); -} +Object unbound = attributes.put(name, value); // Call the valueUnbound() method if necessary if ((unbound != null) && (unbound != value) && @@ -1376,7 +1375,7 @@ // Deserialize the attribute count and attribute values if (attributes == null) -attributes = new HashMap(); +attributes = new Hashtable(); int n = ((Integer) stream.readObject()).intValue(); boolean isValidSave = isValid; isValid = true; @@ -1388,9 +1387,7 @@ if (manager.getContainer().getLogger().isDebugEnabled()) manager.getContainer().getLogger().debug(" loading attribute '" + name + "' with value '" + value + "'"); -synchronized (attributes) { -attributes.put(name, value); -} +attributes.put(name, value); } isValid = isValidSave; @@ -1399,7 +1396,7 @@ } if (notes == null) { -notes = new HashMap(); +notes = new Hashtable(); } } @@ -1442,10 +1439,7 @@ ArrayList saveNames = new ArrayList(); ArrayList saveValues = new ArrayList(); for (int i = 0; i < keys.length; i++) { -Object value = null; -synchronized (attributes) { -value = attributes.get(keys[i]); -} +Object value = attributes.get(keys[i]); if (value == null) continue; else if ( (value instanceof Serializable) @@ -1599,10 +1593,7 @@ protected void removeAttributeInternal(String name, boolean notify) { // Remove this attribute from our collection -Object value = null; -synchronized (attributes) { -value = attributes.remove(name); -} +Object value = attributes.remove(name); // Do we need to do valueUnbound() and attributeRemoved() notification? if (!notify || (value == null)) { 1.374 +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.373 retrieving revision 1.374 diff -u -r1.373 -r1.374 --- changelog.xml 14 Sep 2005 15:05:49 - 1.373 +++ changelog.xml 19 Sep 2005 11:35:50 - 1.374 @@ -63,6 +63,9 @@ 36113: Session persistence for objects with primitive types could fail in some rare cases (remm) + +36541: Full synchronization for session objects attributes collections (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail Delivery (failure tomcat-dev@jakarta.apache.org)
Dangerous Attachment has been Removed. The file "" has been removed because of a virus. It was infected with the "HTML/FileDownload.E" virus. File quarantined as: "". http://www.fortinet.com/VirusEncyclopedia/search/encyclopediaSearch.do?method=quickSearchDirectly&virusName=HTML%2FFileDownload.EPotentially Dangerous Attachment Removed. The file "message.scr" has been blocked. File quarantined as: "".
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources ProxyDirContext.java
remm2005/09/12 03:57:46 Modified:catalina/src/share/org/apache/naming/resources ProxyDirContext.java Log: - Minor tweak: call a load to avoid possible useless allocate call when concurrently trying to add the same entry. Revision ChangesPath 1.19 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java Index: ProxyDirContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ProxyDirContext.java 20 Jul 2005 21:25:18 - 1.18 +++ ProxyDirContext.java 12 Sep 2005 10:57:46 - 1.19 @@ -1596,7 +1596,7 @@ // Add new entry to cache synchronized (cache) { // Check cache size, and remove elements if too big -if (cache.allocate(entry.size)) { +if ((cache.lookup(name) == null) && cache.allocate(entry.size)) { cache.load(entry); } } - 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 ResourceCache.java
remm2005/09/12 03:33:12 Modified:catalina/src/share/org/apache/naming/resources ResourceCache.java Log: - 36594: Fix a number of issues in the class, most importantly fix updating the cache size after a failed allocation. - Submitted by Anil Gangolli. Revision ChangesPath 1.4 +17 -9 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ResourceCache.java Index: ResourceCache.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ResourceCache.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ResourceCache.java27 Feb 2004 14:58:54 - 1.3 +++ ResourceCache.java12 Sep 2005 10:33:12 - 1.4 @@ -17,6 +17,8 @@ package org.apache.naming.resources; import java.util.HashMap; +import java.util.Random; + /** * Implements a special purpose cache. @@ -35,8 +37,14 @@ // - Instance Variables - - + + +/** + * Random generator used to determine elements to free. + */ +protected Random random = new Random(); + + /** * Cache. * Path -> Cache entry. @@ -227,11 +235,9 @@ // Randomly select an entry in the array int entryPos = -1; boolean unique = false; -int count = 0; while (!unique) { unique = true; -entryPos = (int) Math.floor(Math.random() -* (cache.length - 1)); +entryPos = random.nextInt(cache.length) ; // Guarantee uniqueness for (int i = 0; i < entriesFound; i++) { if (toRemove[i] == entryPos) { @@ -305,11 +311,14 @@ public void load(CacheEntry entry) { if (entry.exists) { -insertCache(entry); +if (insertCache(entry)) { +cacheSize += entry.size; +} } else { +int sizeIncrement = (notFoundCache.get(entry.name) == null) ? 1 : 0; notFoundCache.put(entry.name, entry); +cacheSize += sizeIncrement; } -cacheSize += entry.size; } @@ -408,5 +417,4 @@ return null; } - } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/09/08 08:41:11 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session ReplicationStream.java catalina/src/share/org/apache/catalina/util CustomObjectInputStream.java webapps/docs changelog.xml Log: - 36113: Session persistence for objects with primitive types. - The best fix would be to be able to reuse the JDK code (or similar) here. Revision ChangesPath 1.5 +14 -10 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicationStream.java Index: ReplicationStream.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicationStream.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ReplicationStream.java27 Jul 2005 15:11:40 - 1.4 +++ ReplicationStream.java8 Sep 2005 15:41:11 - 1.5 @@ -69,15 +69,19 @@ throws ClassNotFoundException, IOException { String name = classDesc.getName(); boolean tryRepFirst = name.startsWith("org.apache.catalina.cluster"); -try -{ -if ( tryRepFirst ) return findReplicationClass(name); -else return findWebappClass(name); -} -catch ( Exception x ) -{ -if ( tryRepFirst ) return findWebappClass(name); -else return findReplicationClass(name); +try { +try +{ +if ( tryRepFirst ) return findReplicationClass(name); +else return findWebappClass(name); +} +catch ( Exception x ) +{ +if ( tryRepFirst ) return findWebappClass(name); +else return findReplicationClass(name); +} +} catch (ClassNotFoundException e) { +return super.resolveClass(classDesc); } } 1.5 +7 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CustomObjectInputStream.java Index: CustomObjectInputStream.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CustomObjectInputStream.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CustomObjectInputStream.java 10 Mar 2005 23:54:45 - 1.4 +++ CustomObjectInputStream.java 8 Sep 2005 15:41:11 - 1.5 @@ -70,7 +70,12 @@ */ public Class resolveClass(ObjectStreamClass classDesc) throws ClassNotFoundException, IOException { -return Class.forName(classDesc.getName(), false, classLoader); +try { +return Class.forName(classDesc.getName(), false, classLoader); +} catch (ClassNotFoundException e) { +// Try also the superclass because of primitive types +return super.resolveClass(classDesc); +} } 1.371 +4 -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.370 retrieving revision 1.371 diff -u -r1.370 -r1.371 --- changelog.xml 8 Sep 2005 15:00:54 - 1.370 +++ changelog.xml 8 Sep 2005 15:41:11 - 1.371 @@ -56,6 +56,10 @@ 36558: Clear IntrospectionUtils cache when stopping a webapp, as it could leak to keeping a reference to the classloader (remm) + +36113: Session persistence for objects with primitive types could fail in +some rare cases (remm) + - 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
remm2005/09/08 08:00:57 Modified:catalina/src/share/org/apache/catalina/loader WebappClassLoader.java webapps/docs changelog.xml util/java/org/apache/tomcat/util IntrospectionUtils.java Log: - 36558: Clear introspection utils cache, which could leak a reference to the webapp classloader. Revision ChangesPath 1.50 +4 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Index: WebappClassLoader.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- WebappClassLoader.java4 May 2005 07:30:24 - 1.49 +++ WebappClassLoader.java8 Sep 2005 15:00:54 - 1.50 @@ -56,6 +56,7 @@ import org.apache.naming.JndiPermission; import org.apache.naming.resources.Resource; import org.apache.naming.resources.ResourceAttributes; +import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.compat.JdkCompat; /** @@ -1514,6 +1515,8 @@ org.apache.commons.logging.LogFactory.release(this); // Clear the classloader reference in the VM's bean introspector java.beans.Introspector.flushCaches(); +// Clear the IntrospectionUtils cache +IntrospectionUtils.clear(); } 1.370 +4 -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.369 retrieving revision 1.370 diff -u -r1.369 -r1.370 --- changelog.xml 8 Sep 2005 10:45:14 - 1.369 +++ changelog.xml 8 Sep 2005 15:00:54 - 1.370 @@ -52,6 +52,10 @@ 36534: fix equals for URLs returned by ServletContext.getResource() (luehe) + +36558: Clear IntrospectionUtils cache when stopping a webapp, as it +could leak to keeping a reference to the classloader (remm) + 1.16 +4 -0 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.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- IntrospectionUtils.java 26 Jun 2005 21:19:28 - 1.15 +++ IntrospectionUtils.java 8 Sep 2005 15:00:55 - 1.16 @@ -757,6 +757,10 @@ } // other utils +public static void clear() { +objectMethods.clear(); +} + public static String[] findVoidSetters(Class c) { Method m[] = findMethods(c); if (m == null) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/09/08 03:45:14 Modified:catalina/src/share/org/apache/naming/resources DirContextURLStreamHandler.java catalina/src/share/org/apache/catalina/core ApplicationContext.java webapps/docs changelog.xml Log: - 36534: Context relative URLs returned by ServletContext.getResource() for the same path are not equal. - Jan's patch. Revision ChangesPath 1.4 +36 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java Index: DirContextURLStreamHandler.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/DirContextURLStreamHandler.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DirContextURLStreamHandler.java 27 Feb 2004 14:58:54 - 1.3 +++ DirContextURLStreamHandler.java 8 Sep 2005 10:45:13 - 1.4 @@ -89,6 +89,41 @@ } +// URL Methods + + +/** + * Override as part of the fix for 36534, to ensure toString is correct. + */ +protected String toExternalForm(URL u) { +// pre-compute length of StringBuffer +int len = u.getProtocol().length() + 1; +if (u.getPath() != null) { +len += u.getPath().length(); +} +if (u.getQuery() != null) { +len += 1 + u.getQuery().length(); +} +if (u.getRef() != null) +len += 1 + u.getRef().length(); +StringBuffer result = new StringBuffer(len); +result.append(u.getProtocol()); +result.append(":"); +if (u.getPath() != null) { +result.append(u.getPath()); +} +if (u.getQuery() != null) { +result.append('?'); +result.append(u.getQuery()); +} +if (u.getRef() != null) { +result.append("#"); +result.append(u.getRef()); +} +return result.toString(); +} + + // - Public Methods 1.30 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Index: ApplicationContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- ApplicationContext.java 29 Aug 2005 10:38:38 - 1.29 +++ ApplicationContext.java 8 Sep 2005 10:45:14 - 1.30 @@ -497,7 +497,7 @@ try { resources.lookup(path); return new URL -("jndi", null, 0, getJNDIUri(hostName, fullPath), +("jndi", "", 0, getJNDIUri(hostName, fullPath), new DirContextURLStreamHandler(resources)); } catch (Exception e) { // Ignore 1.369 +4 -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.368 retrieving revision 1.369 diff -u -r1.368 -r1.369 --- changelog.xml 6 Sep 2005 12:50:55 - 1.368 +++ changelog.xml 8 Sep 2005 10:45:14 - 1.369 @@ -33,7 +33,7 @@ Remove uneeded files in conf. (remm) -Change distribution file names from jakarta-* to apache-*. + Change distribution file names from jakarta-* to apache-*. (remm) @@ -49,6 +49,9 @@ 36088: Add RUNNING.txt and RELEASE-NOTES.txt to fulldocs distro. (yoavs) + +36534: fix equals for URLs returned by ServletContext.getResource() (luehe) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r279469 - in /tomcat/site/trunk: docs/download.cgi docs/download.html xdocs/download.cgi xdocs/download.xml xdocs/stylesheets/project.xml
Author: remm Date: Wed Sep 7 17:15:11 2005 New Revision: 279469 URL: http://svn.apache.org/viewcvs?rev=279469&view=rev Log: - Remove my already obsolete download pages. - Fix menu link. Removed: tomcat/site/trunk/docs/download.cgi tomcat/site/trunk/docs/download.html tomcat/site/trunk/xdocs/download.cgi tomcat/site/trunk/xdocs/download.xml Modified: tomcat/site/trunk/xdocs/stylesheets/project.xml Modified: tomcat/site/trunk/xdocs/stylesheets/project.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/xdocs/stylesheets/project.xml?rev=279469&r1=279468&r2=279469&view=diff == --- tomcat/site/trunk/xdocs/stylesheets/project.xml (original) +++ tomcat/site/trunk/xdocs/stylesheets/project.xml Wed Sep 7 17:15:11 2005 @@ -21,7 +21,7 @@ - + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r279315 - in /tomcat/site/trunk: build.xml docs/download.cgi docs/download.html docs/lists.html xdocs/download.cgi xdocs/download.xml xdocs/lists.xml xdocs/robots.txt xdocs/stylesheets/project.xml
Author: remm Date: Wed Sep 7 05:53:20 2005 New Revision: 279315 URL: http://svn.apache.org/viewcvs?rev=279315&view=rev Log: - Add placeholder downloads and lists pages. - These use *likely* locations for all links, in particular file names and mailing lists names. Added: tomcat/site/trunk/docs/download.cgi tomcat/site/trunk/docs/download.html tomcat/site/trunk/docs/lists.html tomcat/site/trunk/xdocs/download.cgi tomcat/site/trunk/xdocs/download.xml tomcat/site/trunk/xdocs/lists.xml tomcat/site/trunk/xdocs/robots.txt Modified: tomcat/site/trunk/build.xml tomcat/site/trunk/xdocs/stylesheets/project.xml Modified: tomcat/site/trunk/build.xml URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/build.xml?rev=279315&r1=279314&r2=279315&view=diff == --- tomcat/site/trunk/build.xml (original) +++ tomcat/site/trunk/build.xml Wed Sep 7 05:53:20 2005 @@ -58,10 +58,11 @@ - + + Added: tomcat/site/trunk/docs/download.cgi URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/download.cgi?rev=279315&view=auto == --- tomcat/site/trunk/docs/download.cgi (added) +++ tomcat/site/trunk/docs/download.cgi Wed Sep 7 05:53:20 2005 @@ -0,0 +1,6 @@ +#!/bin/sh +# Wrapper script around mirrors.cgi script +# (we must change to that directory in order for python to pick up the +# python includes correctly) +cd /www/www.apache.org/dyn/mirrors +/www/www.apache.org/dyn/mirrors/mirrors.cgi $* Added: tomcat/site/trunk/docs/download.html URL: http://svn.apache.org/viewcvs/tomcat/site/trunk/docs/download.html?rev=279315&view=auto == --- tomcat/site/trunk/docs/download.html (added) +++ tomcat/site/trunk/docs/download.html Wed Sep 7 05:53:20 2005 @@ -0,0 +1,534 @@ + +http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> + + +The Jakarta Site - Download + + + + + + + + + +http://jakarta.apache.org/";> +http://jakarta.apache.org/images/jakarta-logo.gif"; /> + + +http://jakarta.apache.org/tomcat/";> + + + + + + + + + + + + + + + + +Apache Tomcat + + + +Home + + +Bug Database + + +Resources + + +IRC + + +FAQ + + + +Documentation + + + +Apache Tomcat 5.5 + + +Apache Tomcat 5.0 + + +Apache Tomcat 4.1 + + +Apache Tomcat 3.3 + + + +Download + + + +http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi";>Current Releases + + +http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi";>Apache Tomcat 5.x + + +http://jakarta.apache.org/site/downloads/downloads_tomcat-4.cgi";>Apache Tomcat 4.x + + +http://jakarta.apache.org/site/downloads/downloads_tomcat-3.cgi";>Apache Tomcat 3.x + + + +Archives + + + +Apache Tomcat 4.0 + + +Apache Tomcat 3.2 + + + +Jakarta + + + +Front Page + + +http://jakarta.apache.org/site/news.html";>News & Status + + +http://jakarta.apache.org/site/mission.html";>Mission + + +http://jakarta.apache.org/site/guidelines.html";>Guidelines Notes + + +http://jakarta.apache.org/site/faqs.html";>FAQs + + + +Get Involved + + + +http://jakarta.apache.org/site/getinvolved.html";>Overview + + +http://jakarta.apache.org/site/cvsindex.html";>CVS Repositories + + +http://jakarta.apache.org/site/mail.html";>Mailing Lists + + +http://jakarta.apache.org/site/library.html";>Reference Library + + + +Misc + + + +http://jakarta.apache.org/site/whoweare.html";>Who We Are + + +http://jakarta.apache.org/site/acknowledgements.html";>Acknowledgements + + +http://jakarta.apache.org/site/contact.html";>Contact + + +http://jakarta.apache.org/site/legal.html";>Legal + + + + + + + + + + +Apache Tomcat Downloads + + + + + + + + + +Use the links below to download Apache Tomcat from one of +our mirrors. You must verify the +integrity of the downloaded files using signatures downloaded from +our main distribution directory. + +Only current recommended releases are available on the main +distribution site and its mirrors. Older releases are available from +the http://archive.apache.org/dist/tomcat/";>Tomcat archive download +site and the http://archive.apache.org/dist/jakarta/";>Jakarta archive download +site. + + + + + + +Mirror + + + + + + + + + +[if-any logo] + + +[end] +The currently selected mirror is [preferred]. If you encounter a +problem with this mirror, please select another mirror. If all +mirrors are failing, there are back
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/09/06 05:50:55 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp DataSenders.properties webapps/docs changelog.xml Log: - 36518: Classname typos for senders. - Submitted by Christoph Bachhuber-Haller. Revision ChangesPath 1.2 +2 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSenders.properties Index: DataSenders.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSenders.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DataSenders.properties16 Jul 2005 21:02:17 - 1.1 +++ DataSenders.properties6 Sep 2005 12:50:55 - 1.2 @@ -1,4 +1,4 @@ fastasyncqueue=org.apache.catalina.cluster.tcp.FastAsyncSocketSender -asynchronous=org.apache.catalina..cluster.tcp.AsyncSocketSender -synchronous=org.apache.catalina..cluster.tcp.SocketSender +asynchronous=org.apache.catalina.cluster.tcp.AsyncSocketSender +synchronous=org.apache.catalina.cluster.tcp.SocketSender pooled=org.apache.catalina.cluster.tcp.PooledSocketSender 1.368 +4 -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.367 retrieving revision 1.368 diff -u -r1.367 -r1.368 --- changelog.xml 1 Sep 2005 18:28:24 - 1.367 +++ changelog.xml 6 Sep 2005 12:50:55 - 1.368 @@ -77,7 +77,10 @@ - + + +36518: Classname typos for senders, submitted by Christoph Bachhuber-Haller (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5/resources welcome.bin.html welcome.main.html
remm2005/08/31 09:30:48 Modified:.build.xml tomcat.nsi resources welcome.bin.html welcome.main.html Log: - Update some Strings and bundle names to tomcat.apache.org. - The repositories will likely not be renamed until moving to SVN. - The biggest issue are the jakarta.apache.org images (incl the one in the installer). Revision ChangesPath 1.236 +1 -1 jakarta-tomcat-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v retrieving revision 1.235 retrieving revision 1.236 diff -u -r1.235 -r1.236 --- build.xml 23 Aug 2005 12:40:51 - 1.235 +++ build.xml 31 Aug 2005 16:30:48 - 1.236 @@ -20,7 +20,7 @@ - + 1.83 +5 -5 jakarta-tomcat-5/tomcat.nsi Index: tomcat.nsi === RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- tomcat.nsi4 Aug 2005 06:52:35 - 1.82 +++ tomcat.nsi31 Aug 2005 16:30:48 - 1.83 @@ -17,8 +17,8 @@ VIAddVersionKey FileDescription "Apache Tomcat Installer" VIAddVersionKey FileVersion "2.0" VIAddVersionKey ProductVersion "@VERSION@" - VIAddVersionKey Comments "jakarta.apache.org/tomcat" - VIAddVersionKey InternalName "[EMAIL PROTECTED]@.exe" + VIAddVersionKey Comments "tomcat.apache.org" + VIAddVersionKey InternalName "[EMAIL PROTECTED]@.exe" VIProductVersion @VERSION_NUMBER@ !include "MUI.nsh" @@ -164,7 +164,7 @@ InstallRetry: ClearErrors - nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName "Apache Tomcat" --Description "Apache Tomcat @VERSION@ Server - http://jakarta.apache.org/tomcat/"; --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat5.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"' + nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName "Apache Tomcat" --Description "Apache Tomcat @VERSION@ Server - http://tomcat.apache.org/"; --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat5.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"' Pop $0 StrCmp $0 "0" InstallOk MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP \ @@ -233,7 +233,7 @@ SetOutPath "$SMPROGRAMS\Apache Tomcat 5.5" CreateShortCut "$SMPROGRAMS\Apache Tomcat 5.5\Tomcat Home Page.lnk" \ - "http://jakarta.apache.org/tomcat"; + "http://tomcat.apache.org/"; CreateShortCut "$SMPROGRAMS\Apache Tomcat 5.5\Welcome.lnk" \ "http://127.0.0.1:$R0/"; 1.5 +43 -43jakarta-tomcat-5/resources/welcome.bin.html Index: welcome.bin.html === RCS file: /home/cvs/jakarta-tomcat-5/resources/welcome.bin.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- welcome.bin.html 7 Sep 2004 21:54:30 - 1.4 +++ welcome.bin.html 31 Aug 2005 16:30:48 - 1.5 @@ -1,43 +1,43 @@ - -Apache Tomcat @VERSION@ - - - - -Apache Tomcat @VERSION@ - -Useful references: - -Release notes, with important information -about known issues -http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html";>Changelog -http://jakarta.apache.org/tomcat/tomcat-5.5-doc/status.html";>Status - - - -NOTE: The tar files in this distribution use GNU tar extensions, -and must be untarred with a GNU compatible version of tar. The version -of tar on Solaris and Mac OS X will not work with -these files. - -Tomcat 5.5 requires JRE 5.0 by default. Read the -RELEASE-NOTES and the RUNNING.txt file in the distribution for more details. - - -Packaging Details (or "What Should I Download?") - -jakarta-tomcat-[version].zip or .tar.gz: base distro, all non-embedded users download this. -jakarta-tomcat-[version].exe: Windows installer with base distro contents + Windows installation. -jakarta-tomcat-[version]-admin.zip or .tar.gz: the Tomcat Administration webapp only. -jakarta-tomcat-[version]-compat.zip or .tar.gz: required in addition to the base distro for using tomcat with a Java 1.4 environment. -jakarta-tomcat-[version]-deployer.zip or .tar.gz: the standalone Tomcat Web Application Deployer. -j
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Embedded.java Catalina.java
remm2005/08/31 07:06:40 Modified:webapps/docs changelog.xml catalina/src/share/org/apache/catalina/startup Embedded.java Catalina.java Log: - Fix FIXME: Allow configuration of stream redirection in Embedded. Revision ChangesPath 1.366 +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.365 retrieving revision 1.366 diff -u -r1.365 -r1.366 --- changelog.xml 30 Aug 2005 22:39:36 - 1.365 +++ changelog.xml 31 Aug 2005 14:06:40 - 1.366 @@ -40,6 +40,9 @@ 36343: Only normalize out backslash on Windows platforms. (billbarker) + +Allow configuring standard stream redirection (remm) + 1.28 +43 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Embedded.java Index: Embedded.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Embedded.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- Embedded.java 8 Dec 2004 14:34:56 - 1.27 +++ Embedded.java 31 Aug 2005 14:06:40 - 1.28 @@ -46,6 +46,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.tomcat.util.IntrospectionUtils; +import org.apache.tomcat.util.log.SystemLogHandler; /** @@ -140,6 +141,12 @@ /** + * Is standard streams redirection enabled ? + */ +protected boolean redirectStreams = true; + + +/** * The set of Engines that have been deployed in this server. Normally * there will only be one. */ @@ -219,6 +226,31 @@ /** + * Return true if redirction of standard streams is enabled. + */ +public boolean isRedirectStreams() { + +return (this.redirectStreams); + +} + + +/** + * Enables or disables naming support. + * + * @param useNaming The new use naming value + */ +public void setRedirectStreams(boolean redirectStreams) { + +boolean oldRedirectStreams = this.redirectStreams; +this.redirectStreams = redirectStreams; +support.firePropertyChange("redirectStreams", new Boolean(oldRedirectStreams), + new Boolean(this.redirectStreams)); + +} + + +/** * Return the default Realm for our Containers. */ public Realm getRealm() { @@ -932,6 +964,16 @@ } + +protected void initStreams() { +if (redirectStreams) { +// Replace System.out and System.err with a custom PrintStream +SystemLogHandler systemlog = new SystemLogHandler(System.out); +System.setOut(systemlog); +System.setErr(systemlog); +} +} + // Private Methods 1.38 +3 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java Index: Catalina.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- Catalina.java 30 Jun 2005 13:04:34 - 1.37 +++ Catalina.java 31 Aug 2005 14:06:40 - 1.38 @@ -31,7 +31,6 @@ import org.apache.catalina.core.StandardServer; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.Rule; -import org.apache.tomcat.util.log.SystemLogHandler; import org.xml.sax.Attributes; import org.xml.sax.InputSource; @@ -480,11 +479,8 @@ return; } -// Replace System.out and System.err with a custom PrintStream -// TODO: move to Embedded, make it configurable -SystemLogHandler systemlog = new SystemLogHandler(System.out); -System.setOut(systemlog); -System.setErr(systemlog); +// Stream redirection +initStreams(); // Start the new server if (server instanceof Lifecycle) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/30 15:39:36 Modified:jasper2/src/share/org/apache/jasper/compiler TagLibraryInfoImpl.java Parser.java JspDocumentParser.java jasper2/src/share/org/apache/jasper EmbeddedServletOptions.java Options.java JspC.java webapps/docs changelog.xml Log: - JSP compilation speed improvement using tag library information caching. - Submitted by Xingbo Gao. Revision ChangesPath 1.60 +1 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java Index: TagLibraryInfoImpl.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- TagLibraryInfoImpl.java 23 Mar 2005 15:48:37 - 1.59 +++ TagLibraryInfoImpl.java 30 Aug 2005 22:39:34 - 1.60 @@ -86,7 +86,7 @@ print("urn", urn, out); print("info", info, out); print("uri", uri, out); -print("tagLibraryValidator", tagLibraryValidator.toString(), out); +print("tagLibraryValidator", "" + tagLibraryValidator, out); for(int i = 0; i < tags.length; i++) out.println(tags[i].toString()); 1.91 +17 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java Index: Parser.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v retrieving revision 1.90 retrieving revision 1.91 diff -u -r1.90 -r1.91 --- Parser.java 9 Mar 2005 19:13:20 - 1.90 +++ Parser.java 30 Aug 2005 22:39:34 - 1.91 @@ -414,14 +414,23 @@ prefix, uri, uriPrev); } if (pageInfo.getTaglib(uri) == null) { - String[] location = ctxt.getTldLocation(uri); - pageInfo.addTaglib(uri, -new TagLibraryInfoImpl(ctxt, - parserController, - prefix, - uri, - location, - err)); +TagLibraryInfoImpl impl = null; +if (ctxt.getOptions().isCaching()) { +impl = (TagLibraryInfoImpl) ctxt.getOptions().getCache().get(uri); +} +if (impl == null) { +String[] location = ctxt.getTldLocation(uri); +impl = new TagLibraryInfoImpl(ctxt, +parserController, +prefix, +uri, +location, +err); +if (ctxt.getOptions().isCaching()) { +ctxt.getOptions().getCache().put(uri, impl); +} +} + pageInfo.addTaglib(uri, impl); } pageInfo.addPrefixMapping(prefix, uri); } else { 1.86 +22 -14 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Index: JspDocumentParser.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v retrieving revision 1.85 retrieving revision 1.86 diff -u -r1.85 -r1.86 --- JspDocumentParser.java11 Aug 2005 12:00:32 - 1.85 +++ JspDocumentParser.java30 Aug 2005 22:39:35 - 1.86 @@ -1233,20 +1233,28 @@ String[] location = ctxt.getTldLocation(uri); if (location != null || !isPlainUri) { -/* - * If the uri value is a plain uri, a translation error must - * not be generated if the uri is not found in the taglib map. - * Instead, any actions in the namespace defined by the uri - * value must be treated as uninterpreted. - */ -result = -new TagLibraryInfoImpl( -ctxt, -parserController, -prefix, -uri, -location, -err); +if (ctxt.getOptions().isCaching()) { +resu
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler AntCompiler.java JspRuntimeContext.java
remm2005/08/30 15:38:34 Modified:jasper2/src/share/org/apache/jasper/compiler AntCompiler.java JspRuntimeContext.java Log: - Restrict SystemLogHandler to the Ant compiler (the regular compiler does not need the nasty hacks). Revision ChangesPath 1.8 +6 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/AntCompiler.java Index: AntCompiler.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/AntCompiler.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AntCompiler.java 22 Oct 2004 17:13:27 - 1.7 +++ AntCompiler.java 30 Aug 2005 22:38:33 - 1.8 @@ -42,7 +42,10 @@ */ public class AntCompiler extends Compiler { - +static { +System.setErr(new SystemLogHandler(System.err)); +} + // - Instance Variables protected Project project=null; @@ -223,14 +226,14 @@ } errorReport.append(logger.getReport()); - + // Stop capturing the System.err output for this thread String errorCapture = SystemLogHandler.unsetThread(); if (errorCapture != null) { errorReport.append(System.getProperty("line.separator")); errorReport.append(errorCapture); } - + if (!ctxt.keepGenerated()) { File javaFile = new File(javaFileName); javaFile.delete(); 1.28 +1 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java Index: JspRuntimeContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- JspRuntimeContext.java21 Mar 2005 15:38:12 - 1.27 +++ JspRuntimeContext.java30 Aug 2005 22:38:33 - 1.28 @@ -38,7 +38,6 @@ import org.apache.jasper.Constants; import org.apache.jasper.JspCompilationContext; import org.apache.jasper.Options; -import org.apache.jasper.util.SystemLogHandler; import org.apache.jasper.runtime.JspFactoryImpl; import org.apache.jasper.security.SecurityClassLoad; import org.apache.jasper.servlet.JspServletWrapper; @@ -87,8 +86,6 @@ */ public JspRuntimeContext(ServletContext context, Options options) { -System.setErr(new SystemLogHandler(System.err)); - this.context = context; this.options = options; @@ -246,10 +243,6 @@ * Process a "destory" event for this web application context. */ public void destroy() { - -if(System.err instanceof SystemLogHandler) -System.setErr(((SystemLogHandler)System.err).getWrapped()); - threadStop(); Iterator servlets = jsps.values().iterator(); - 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
remm2005/08/29 04:02:06 Modified:catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java Log: - 36136: Refactor the login and error page forward to protected methods, which indeed enables easier extending (the authenticate method being too large). - Submitted by Scott Stark. Revision ChangesPath 1.24 +47 -22 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.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- FormAuthenticator.java22 May 2005 17:18:28 - 1.23 +++ FormAuthenticator.java29 Aug 2005 11:02:06 - 1.24 @@ -53,10 +53,9 @@ public class FormAuthenticator extends AuthenticatorBase { + private static Log log = LogFactory.getLog(FormAuthenticator.class); - - // - Instance Variables @@ -240,15 +239,7 @@ sm.getString("authenticator.requestBodyTooBig")); return (false); } -RequestDispatcher disp = -context.getServletContext().getRequestDispatcher -(config.getLoginPage()); -try { -disp.forward(request.getRequest(), response.getResponse()); -response.finishResponse(); -} catch (Throwable t) { -log.warn("Unexpected error forwarding to login page", t); -} +forwardToLoginPage(request, response, config); return (false); } @@ -264,14 +255,7 @@ log.debug("Authenticating username '" + username + "'"); principal = realm.authenticate(username, password); if (principal == null) { -RequestDispatcher disp = -context.getServletContext().getRequestDispatcher -(config.getErrorPage()); -try { -disp.forward(request.getRequest(), response.getResponse()); -} catch (Throwable t) { -log.warn("Unexpected error forwarding to error page", t); -} +forwardToErrorPage(request, response, config); return (false); } @@ -315,6 +299,47 @@ /** + * Called to forward to the login page + * + * @param request Request we are processing + * @param response Response we are creating + * @param configLogin configuration describing how authentication + * should be performed + */ +protected void forwardToLoginPage(Request request, Response response, LoginConfig config) { +RequestDispatcher disp = +context.getServletContext().getRequestDispatcher +(config.getLoginPage()); +try { +disp.forward(request.getRequest(), response.getResponse()); +response.finishResponse(); +} catch (Throwable t) { +log.warn("Unexpected error forwarding to login page", t); +} +} + + +/** + * Called to forward to the error page + * + * @param request Request we are processing + * @param response Response we are creating + * @param configLogin configuration describing how authentication + * should be performed + */ +protected void forwardToErrorPage(Request request, Response response, LoginConfig config) { +RequestDispatcher disp = +context.getServletContext().getRequestDispatcher +(config.getErrorPage()); +try { +disp.forward(request.getRequest(), response.getResponse()); +} catch (Throwable t) { +log.warn("Unexpected error forwarding to error page", t); +} +} + + +/** * Does this request match the saved one (so that it must be the redirect * we signalled after successful authentication? * @@ -423,7 +448,7 @@ * @param session The session to contain the saved information * @throws IOException */ -private void saveRequest(Request request, Session session) +protected void saveRequest(Request request, Session session) throws IOException { // Create and populate a SavedRequest object for this request @@ -478,7 +503,7 @@ * * @param session Our current session */ -private String savedRequestURL(Session session) { +
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationContext.java
remm2005/08/29 03:38:39 Modified:catalina/src/share/org/apache/catalina/core ApplicationContext.java Log: - Simplify code: no change. Revision ChangesPath 1.29 +3 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Index: ApplicationContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ApplicationContext.java 3 May 2005 17:24:10 - 1.28 +++ ApplicationContext.java 29 Aug 2005 10:38:38 - 1.29 @@ -335,11 +335,7 @@ if (wrapper == null) return (null); -ApplicationDispatcher dispatcher; -dispatcher = - new ApplicationDispatcher(wrapper, null, null, null, null, name); - -return ((RequestDispatcher) dispatcher); +return new ApplicationDispatcher(wrapper, null, null, null, null, name); } @@ -450,7 +446,7 @@ mappingData.recycle(); // Construct a RequestDispatcher to process this request -return (RequestDispatcher) new ApplicationDispatcher +return new ApplicationDispatcher (wrapper, uriCC.toString(), wrapperPath, pathInfo, queryString, null); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.properties.default
remm2005/08/27 02:43:39 Modified:.build.properties.default Log: - Fix NSIS path. Revision ChangesPath 1.159 +2 -2 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.158 retrieving revision 1.159 diff -u -r1.158 -r1.159 --- build.properties.default 19 Aug 2005 13:00:43 - 1.158 +++ build.properties.default 27 Aug 2005 09:43:39 - 1.159 @@ -221,7 +221,7 @@ nsis.installoptions.dll=${nsis.home}/Plugins/InstallOptions.dll nsis.nsexec.dll=${nsis.home}/Plugins/nsExec.dll nsis.nsisdl.dll=${nsis.home}/Plugins/nsisdl.dll -nsis.loc=${base-sf.loc}/nsis/nsis-2.0.exe +nsis.loc=${base-sf.loc}/nsis/nsis20.exe # - Struts, version 1.2.4 or later - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/26 05:31:05 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java AjpAprProtocol.java webapps/docs changelog.xml Log: - Now I know what secret is used for. Revision ChangesPath 1.18 +26 -0 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- AjpAprProcessor.java 4 Aug 2005 07:07:57 - 1.17 +++ AjpAprProcessor.java 26 Aug 2005 12:31:05 - 1.18 @@ -32,6 +32,7 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; +import org.apache.jk.common.AjpConstants; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; import org.apache.tomcat.util.buf.ByteChunk; @@ -311,6 +312,13 @@ public void setTomcatAuthentication(boolean tomcatAuthentication) { this.tomcatAuthentication = tomcatAuthentication; } +/** + * Required secret. + */ +protected String requiredSecret = null; +public void setRequiredSecret(String requiredSecret) { this.requiredSecret = requiredSecret; } + + // - Public Methods @@ -677,6 +685,7 @@ } // Decode extra attributes +boolean secret = false; byte attributeCode; while ((attributeCode = requestHeaderMessage.getByte()) != Constants.SC_A_ARE_DONE) { @@ -756,6 +765,17 @@ requestHeaderMessage.getBytes(request.method()); break; +case AjpConstants.SC_A_SECRET: +requestHeaderMessage.getBytes(tmpMB); +if (requiredSecret != null) { +secret = true; +if (!tmpMB.equals(requiredSecret)) { +response.setStatus(403); +error = true; +} +} +break; + default: // Ignore unknown attribute for backward compatibility break; @@ -764,6 +784,12 @@ } +// Check if secret was submitted if required +if ((requiredSecret != null) && !secret) { +response.setStatus(403); +error = true; +} + // Check for a full URI (including protocol://host:port/) ByteChunk uriBC = request.requestURI().getByteChunk(); if (uriBC.startsWithIgnoreCase("http", 0)) { 1.8 +12 -0 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java Index: AjpAprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AjpAprProtocol.java 1 Aug 2005 10:00:59 - 1.7 +++ AjpAprProtocol.java 26 Aug 2005 12:31:05 - 1.8 @@ -100,6 +100,12 @@ /** + * Required secret. + */ +protected String requiredSecret = null; + + +/** * Adapter which will process the requests recieved by this endpoint. */ private Adapter adapter; @@ -394,6 +400,11 @@ } +public void setRequiredSecret(String requiredSecret) { +this.requiredSecret = requiredSecret; +} + + // -- AjpConnectionHandler Inner Class @@ -415,6 +426,7 @@ processor = new AjpAprProcessor(proto.ep); processor.setAdapter(proto.adapter); processor.setTomcatAuthentication(proto.tomcatAuthentication); +processor.setRequiredSecret(proto.requiredSecret); localProcessor.set(processor); if (proto.getDomain() != null) { synchronized (this) { 1.363 +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.362 retrieving revision 1.363 diff -u -r1.362 -r1.363 --- changelog.xml 25 Aug 2005 12:30:14 - 1.362 +++ changelog.xml 26 Aug 2005 12:31:05 - 1.36
cvs commit: jakarta-tomcat-catalina/webapps/docs deployer-howto.xml
remm2005/08/26 05:30:11 Modified:webapps/docs deployer-howto.xml Log: - Brand new deployer specs. - Submitted by Allistair Crossley. Revision ChangesPath 1.8 +313 -164 jakarta-tomcat-catalina/webapps/docs/deployer-howto.xml Index: deployer-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/deployer-howto.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- deployer-howto.xml1 Sep 2004 22:04:28 - 1.7 +++ deployer-howto.xml26 Aug 2005 12:30:11 - 1.8 @@ -7,174 +7,323 @@ &project; -Remy Maucherat -Deployer HOW-TO +Allistair Crossley +Tomcat Web Application Deployment - - - -Introduction -Context XML descriptors -Deploying on Tomcat startup -Deploying on running Tomcat server -Deploying using the Client Deployer Package - - - - - - - - -The deployer, as its name implies, allows deploying and undeploying web -applications to the Tomcat server, either statically (the application is -setup before the server is started), or dynamically (in conjunction with the -Tomcat Manager web application or manipulating already deployed applications). - - - - - - -A Context XML descriptor is a fragment of XML data which contains a valid -Context element which would normally be found in the main server configuration -file (conf/server.xml), and allows easy and automated manipulation -of web applications by the various management tools available in Tomcat. -For a given host, the Context descriptors are located in -$CATALINA_HOME/conf/[enginename]/[hostname]/foo.xml. Note that -while the name of the file is not tied to the webapp name, Tomcat will create -Context descriptors which match the webapp name whenever it will generate a -Context descriptor. - - -Context descriptors allow defining all aspects and configuration parameters -of a Context, such as naming resources and session manager configuration. -It should be noted that the docBase specified in the Context element can -refer to either the .WAR or the directory which will be created when the -.WAR is expanded or the .WAR itself. - - - - - -The webapps which are present in the host appBase will be deployed if the -host "deployOnStartup" property is true. The deployment process is -the following: - -The Context XML declarations will be deployed first -Expanded web applications not referenced by Context XML declarations -will then be deployed; if they have an associated .WAR file and it is -newer than the expanded web application, the expanded directory will -be removed and the webapp will be redeployed from the .WAR -.WAR files will be deployed - -For each deployed web application, a matching Context XML descriptor will be -created unless one exists already. - - - - - - -If the host "autoDeploy" property is true, the host will attempt to deploy -and update web applications dynamically, as needed. The host will need to -have background processing enabled for automatic reloading to work, which -is the default. - -This includes: - -Deployment of WARs which are copied to the host appBase. -Deployment of expanded web applications which are copied to the host -appBase. -Redeployment of a web application which has been deployed from a WAR -when the WAR is updated: the expanded web application is removed, -and the WAR is expanded again. This will not happen if the host is -configured so that WARs are not expanded, in which case the webapp -will be simply redeployed. -Redeployment of the web application if the /WEB-INF/web.xml file is -updated. -Redeployment of the web application if the context XML file from which -the web application has been deployed is updated. -Redeployment of the web application if a context XML file (with a -name corresponding to the context path of the previously deployed -application) is added in the -$CATALINA_HOME/conf/[enginename]/[hostname]/ folder. -Undeployment of the web application if its document base is deleted -(on Windows, this assumes that anti locking features are enabled, otherwise -it is not possible to delete the resources of a running web application). - -Note: Web application reloading can also be configured in the loader, in which -case loaded classes will be tracked for changes. - - - - - - -The client deployer is a package which can be used to validate, compile, -and deploy a web application to a production or development server. It should -be note
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspCompilationContext.java
remm2005/08/25 07:55:55 Modified:jasper2/src/share/org/apache/jasper JspCompilationContext.java Log: - Add debug logging for compiler loading CL failures. Revision ChangesPath 1.57 +7 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- JspCompilationContext.java25 Aug 2005 12:36:32 - 1.56 +++ JspCompilationContext.java25 Aug 2005 14:55:55 - 1.57 @@ -51,6 +51,9 @@ */ public class JspCompilationContext { +protected org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog(JspCompilationContext.class); + private Hashtable tagFileJarUrls; private boolean isPackagedTagFile; @@ -224,13 +227,14 @@ return jspCompiler; } -private static Compiler createCompiler(String className) { +private Compiler createCompiler(String className) { Compiler compiler = null; try { compiler = (Compiler) Class.forName(className).newInstance(); } catch (Throwable t) { -// Log ? -// FIXME: log +if (log.isDebugEnabled()) { +log.debug(Localizer.getMessage("jsp.error.compiler"), t); +} } return compiler; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspCompilationContext.java
remm2005/08/25 05:36:32 Modified:jasper2/src/share/org/apache/jasper JspCompilationContext.java Log: - Remove unused log. Revision ChangesPath 1.56 +0 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- JspCompilationContext.java25 Aug 2005 12:30:18 - 1.55 +++ JspCompilationContext.java25 Aug 2005 12:36:32 - 1.56 @@ -51,9 +51,6 @@ */ public class JspCompilationContext { -protected org.apache.commons.logging.Log log = - org.apache.commons.logging.LogFactory.getLog(JspCompilationContext.class); - private Hashtable tagFileJarUrls; private boolean isPackagedTagFile; - 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 StandardHostValve.java
remm2005/08/25 05:32:31 Modified:catalina/src/share/org/apache/catalina/core StandardHostValve.java Log: - Cleanup. - Remove useless cast, as suggested by Jan Luehe. Revision ChangesPath 1.26 +2 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostValve.java Index: StandardHostValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostValve.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- StandardHostValve.java18 Aug 2005 13:25:18 - 1.25 +++ StandardHostValve.java25 Aug 2005 12:32:30 - 1.26 @@ -177,8 +177,7 @@ if (log.isDebugEnabled()) { log.debug (sm.getString("standardHost.clientAbort", -((ClientAbortException) realError).getCause() -.getMessage())); +realError.getCause().getMessage())); } return; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspCompilationContext.java
remm2005/08/25 05:30:18 Modified:jasper2/src/share/org/apache/jasper/resources LocalStrings.properties webapps/docs changelog.xml jndi-datasource-examples-howto.xml jasper2/src/share/org/apache/jasper JspCompilationContext.java Log: - Message for no compiler available. - 36319: DBCP docs, submitted by Xavier Poinsard. Revision ChangesPath 1.10 +2 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/LocalStrings.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- LocalStrings.properties 21 Jul 2005 20:50:56 - 1.9 +++ LocalStrings.properties 25 Aug 2005 12:30:14 - 1.10 @@ -3,6 +3,7 @@ # Default localized string information # Localized this the Default Locale as is en_US +jsp.error.compiler=No Java compiler available jsp.error.bad.servlet.engine=Incorrect servlet engine version! jsp.error.no.scratch.dir=The JSP engine is not configured with a scratch dir.\ \n Please add \"jsp.initparams=scratchdir=\" \ 1.362 +41 -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.361 retrieving revision 1.362 diff -u -r1.361 -r1.362 --- changelog.xml 22 Aug 2005 09:14:58 - 1.361 +++ changelog.xml 25 Aug 2005 12:30:14 - 1.362 @@ -26,6 +26,47 @@ + + + + +Remove uneeded files in conf (remm) + + + + + + + + + + + + + + + + + +Fix NPE with an error message when no Java compiler is available (remm) + + + + + + + + + + + + +36319: Fix broken link to DBCP docs, submitted by Xavier Poinsard (remm) + + + + + 1.17 +2 -3 jakarta-tomcat-catalina/webapps/docs/jndi-datasource-examples-howto.xml Index: jndi-datasource-examples-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/jndi-datasource-examples-howto.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- jndi-datasource-examples-howto.xml11 Aug 2005 14:53:00 - 1.16 +++ jndi-datasource-examples-howto.xml25 Aug 2005 12:30:16 - 1.17 @@ -64,9 +64,8 @@ JDBC 3.0 features with a 1.4 JVM. -See the http://jakarta.apache.org/commons/dbcp/api/index.html";> -DBCP Javadocs BasicDataSource class for a complete list -of configuration parameters. +See the http://jakarta.apache.org/commons/dbcp/configuration.html";> +DBCP documentation for a complete list of configuration parameters. 1.55 +6 -0 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- JspCompilationContext.java13 Sep 2004 07:30:53 - 1.54 +++ JspCompilationContext.java25 Aug 2005 12:30:18 - 1.55 @@ -51,6 +51,9 @@ */ public class JspCompilationContext { +protected org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog(JspCompilationContext.class); + private Hashtable tagFileJarUrls; private boolean isPackagedTagFile; @@ -217,6 +220,9 @@ jspCompiler = createCompiler("org.apache.jasper.compiler.JDTCompiler"); } } +if (jspCompiler == null) { +throw new IllegalStateException(Localizer.getMessage("jsp.error.compiler")); +} jspCompiler.init(this, jsw); return jspCompiler; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/08/23 06:16:45 Modified:webapps/docs apr.xml Log: - Update Windows paragraph. Revision ChangesPath 1.10 +7 -3 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- apr.xml 11 Aug 2005 13:03:12 - 1.9 +++ apr.xml 23 Aug 2005 13:16:45 - 1.10 @@ -47,9 +47,13 @@ - Windows binaries are provided for libapr and libtcnative. Windows OpenSSL - binaries are linked from the http://www.openssl.org";>Official OpenSSL website - (see related/binaries). + Windows binaries are provided for tcnative-1, which is a statically compiled .dll which includes + OpenSSL and APR. It can be downloaded from http://tomcat.heanet.ie/native/";>here + as 32bit or AMD x86-64 binaries. + In security conscious production environments, it is recommended to use separate shared dlls + for OpenSSL, APR, and libtcnative-1, and update them as needed according to security bulletins. + Windows OpenSSL binaries are linked from the http://www.openssl.org";>Official OpenSSL + website (see related/binaries). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.xml
remm2005/08/23 05:40:51 Modified:.build.xml Log: - Cleanup: remove a number of (apparently) useless files from conf. Revision ChangesPath 1.235 +11 -0 jakarta-tomcat-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v retrieving revision 1.234 retrieving revision 1.235 diff -u -r1.234 -r1.235 --- build.xml 2 Aug 2005 19:08:07 - 1.234 +++ build.xml 23 Aug 2005 12:40:51 - 1.235 @@ -1295,6 +1295,17 @@ + + + + + + + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.properties.default
remm2005/08/19 06:00:43 Modified:.build.properties.default Log: - Revert to NSIS 2.0: NSIS 2.0.8 matches files differently (I think in a broken way) and the release contents are messed up. - Upgrading to a new NSIS 2.0.x will need some effort (after 3 hours, I can't quite figure how the new one matches stuff: for example File /r server\lib will cause server\webapps\admin\WEB-INF\lib). Revision ChangesPath 1.158 +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.157 retrieving revision 1.158 diff -u -r1.157 -r1.158 --- build.properties.default 2 Aug 2005 19:08:07 - 1.157 +++ build.properties.default 19 Aug 2005 13:00:43 - 1.158 @@ -216,12 +216,12 @@ # - NSIS, version 2.0 or later - -nsis.home=${base.path}/nsis-2.08 +nsis.home=${base.path}/nsis-2.0 nsis.exe=${nsis.home}/makensis.exe nsis.installoptions.dll=${nsis.home}/Plugins/InstallOptions.dll nsis.nsexec.dll=${nsis.home}/Plugins/nsExec.dll -nsis.nsisdl.dll=${nsis.home}/Plugins/NSISdl.dll -nsis.loc=${base-sf.loc}/nsis/nsis-2.08.exe +nsis.nsisdl.dll=${nsis.home}/Plugins/nsisdl.dll +nsis.loc=${base-sf.loc}/nsis/nsis-2.0.exe # - Struts, version 1.2.4 or later - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/19 01:00:37 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java webapps/docs changelog.xml Log: - Disable the built-in HTTP compression when sendfile is used for a resource. Revision ChangesPath 1.32 +1 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- Http11AprProcessor.java 4 Aug 2005 07:07:57 - 1.31 +++ Http11AprProcessor.java 19 Aug 2005 08:00:37 - 1.32 @@ -1583,9 +1583,8 @@ // Check for compression boolean useCompression = false; -if (entityBody && (compressionLevel > 0)) { +if (entityBody && (compressionLevel > 0) && (sendfileData == null)) { useCompression = isCompressable(); - // Change content-length to -1 to force chunking if (useCompression) { response.setContentLength(-1); 1.360 +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.359 retrieving revision 1.360 diff -u -r1.359 -r1.360 --- changelog.xml 18 Aug 2005 13:25:18 - 1.359 +++ changelog.xml 19 Aug 2005 08:00:37 - 1.360 @@ -129,6 +129,9 @@ 36173: Add missing sync in FastHttpDateFormat.formatDate, submitted by Alexei Krainiouk (remm) + +Disable HTTP compression when sendfile is used for a resource (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/18 06:25:18 Modified:catalina/src/share/org/apache/catalina/connector ClientAbortException.java catalina/src/share/org/apache/catalina/core StandardHostValve.java webapps/docs changelog.xml Log: - 35984: Use getCause. Revision ChangesPath 1.3 +6 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/ClientAbortException.java Index: ClientAbortException.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/ClientAbortException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClientAbortException.java 27 Feb 2004 14:58:41 - 1.2 +++ ClientAbortException.java 18 Aug 2005 13:25:18 - 1.3 @@ -112,15 +112,15 @@ /** - * Returns the throwable that caused this exception, if any. + * Returns the cause that caused this exception, if any. */ -public Throwable getThrowable() { - +public Throwable getCause() { + return (throwable); - + } - + /** * Return a formatted string that describes this exception. */ 1.25 +7 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostValve.java Index: StandardHostValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostValve.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- StandardHostValve.java27 Sep 2004 16:04:05 - 1.24 +++ StandardHostValve.java18 Aug 2005 13:25:18 - 1.25 @@ -174,10 +174,12 @@ // If this is an aborted request from a client just log it and return if (realError instanceof ClientAbortException ) { -log.debug -(sm.getString("standardHost.clientAbort", - ((ClientAbortException) realError).getThrowable() - .getMessage())); +if (log.isDebugEnabled()) { +log.debug +(sm.getString("standardHost.clientAbort", +((ClientAbortException) realError).getCause() +.getMessage())); +} return; } 1.359 +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.358 retrieving revision 1.359 diff -u -r1.358 -r1.359 --- changelog.xml 17 Aug 2005 15:07:19 - 1.358 +++ changelog.xml 18 Aug 2005 13:25:18 - 1.359 @@ -86,6 +86,12 @@ 35978: Bad handling of single range requests greater than 2GB in the DefaultServlet (remm) + +35984: Client abort exceptions will now use getCause (remm) + + +Fix handling of non-file based includes with SSI, submitted by David Becker (markt) + - 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/tagplugin TagPluginContext.java
remm2005/08/18 01:24:15 Modified:jasper2/src/share/org/apache/jasper/compiler/tagplugin TagPluginContext.java Log: - Javadoc fixes. Revision ChangesPath 1.15 +1 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin/TagPluginContext.java Index: TagPluginContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/tagplugin/TagPluginContext.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- TagPluginContext.java 17 Mar 2004 19:23:04 - 1.14 +++ TagPluginContext.java 18 Aug 2005 08:24:14 - 1.15 @@ -84,7 +84,7 @@ */ void generateAttribute(String attribute); -/* +/** * Generate codes for the body of the custom tag */ void generateBody(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/ROOT favicon.ico
remm2005/08/17 08:29:18 Added: webapps/ROOT favicon.ico Log: - No comment. Revision ChangesPath 1.1 jakarta-tomcat-catalina/webapps/ROOT/favicon.ico <> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/17 08:07:19 Modified:catalina/src/share/org/apache/catalina/connector Request.java util/java/org/apache/tomcat/util/buf StringCache.java webapps/docs changelog.xml Log: - 36228: Some more CNFE. Revision ChangesPath 1.25 +8 -1 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.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Request.java 10 May 2005 20:51:43 - 1.24 +++ Request.java 17 Aug 2005 15:07:19 - 1.25 @@ -46,6 +46,7 @@ import org.apache.tomcat.util.buf.B2CConverter; import org.apache.tomcat.util.buf.MessageBytes; +import org.apache.tomcat.util.buf.StringCache; import org.apache.tomcat.util.http.Cookies; import org.apache.tomcat.util.http.FastHttpDateFormat; import org.apache.tomcat.util.http.Parameters; @@ -85,6 +86,12 @@ // --- Constructors +static { +// Ensure that classes are loaded for SM +new StringCache.ByteEntry(); +new StringCache.CharEntry(); +} + public Request() { formats[0].setTimeZone(GMT_ZONE); 1.6 +2 -2 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/StringCache.java Index: StringCache.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/StringCache.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- StringCache.java 27 Jul 2005 15:12:02 - 1.5 +++ StringCache.java 17 Aug 2005 15:07:19 - 1.6 @@ -620,7 +620,7 @@ // -- ByteEntry Inner Class -protected static class ByteEntry { +public static class ByteEntry { public byte[] name = null; public String enc = null; @@ -645,7 +645,7 @@ // -- CharEntry Inner Class -protected static class CharEntry { +public static class CharEntry { public char[] name = null; public String value = null; 1.358 +2 -2 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.357 retrieving revision 1.358 diff -u -r1.357 -r1.358 --- changelog.xml 16 Aug 2005 16:52:42 - 1.357 +++ changelog.xml 17 Aug 2005 15:07:19 - 1.358 @@ -73,7 +73,7 @@ 34794: Update connector documentation to include clientAuth attribute. (yoavs) -35894: Fix CNFE when starting in a sandbox. (billbarker) +35894, 36228: Fix CNFE when starting in a sandbox. (billbarker, remm) Add version check for Tomcat native so that incompatible API changes are detected early (remm) @@ -121,7 +121,7 @@ 36173: Add missing sync in FastHttpDateFormat.formatDate, submitted -by Alexei (remm) +by Alexei Krainiouk (remm) - 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 FastHttpDateFormat.java
remm2005/08/16 09:52:42 Modified:webapps/docs changelog.xml util/java/org/apache/tomcat/util/http FastHttpDateFormat.java Log: - 36173: Sync. Revision ChangesPath 1.357 +4 -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.356 retrieving revision 1.357 diff -u -r1.356 -r1.357 --- changelog.xml 16 Aug 2005 16:20:17 - 1.356 +++ changelog.xml 16 Aug 2005 16:52:42 - 1.357 @@ -119,6 +119,10 @@ Security exception in APR AJP implementation when running with the security manager enabled. (remm) + +36173: Add missing sync in FastHttpDateFormat.formatDate, submitted +by Alexei (remm) + 1.5 +3 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/FastHttpDateFormat.java Index: FastHttpDateFormat.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/FastHttpDateFormat.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FastHttpDateFormat.java 24 Feb 2004 08:50:04 - 1.4 +++ FastHttpDateFormat.java 16 Aug 2005 16:52:42 - 1.5 @@ -139,7 +139,9 @@ } } else { synchronized (formatCache) { -newDate = format.format(dateValue); +synchronized (format) { +newDate = format.format(dateValue); +} updateCache(formatCache, longValue, newDate); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/16 09:20:17 Modified:catalina/src/share/org/apache/catalina/ant catalina.tasks webapps/docs changelog.xml Log: - Add back jspc Ant task (needed for the deployer). Revision ChangesPath 1.4 +3 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/catalina.tasks Index: catalina.tasks === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/catalina.tasks,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- catalina.tasks24 Jun 2005 11:52:51 - 1.3 +++ catalina.tasks16 Aug 2005 16:20:17 - 1.4 @@ -9,6 +9,7 @@ stop=org.apache.catalina.ant.StopTask undeploy=org.apache.catalina.ant.UndeployTask validator=org.apache.catalina.ant.ValidatorTask + #Jk Task jkstatus=org.apache.catalina.ant.JKStatusUpdateTask @@ -17,3 +18,5 @@ jmxManagerGet=org.apache.catalina.ant.JMXGetTask jmxManagerQuery=org.apache.catalina.ant.JMXQueryTask +# Jasper tasks +jasper2=org.apache.jasper.JspC 1.356 +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.355 retrieving revision 1.356 diff -u -r1.355 -r1.356 --- changelog.xml 11 Aug 2005 12:00:32 - 1.355 +++ changelog.xml 16 Aug 2005 16:20:17 - 1.356 @@ -45,6 +45,9 @@ The Windows installer will now optionally download a (32bit) Windows .dll for Tomcat native from HEAnet (remm) + +Declaration of jspc Ant task to fix the deployer package (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/08/11 06:03:12 Modified:webapps/docs apr.xml Log: - Update to current packaging. Revision ChangesPath 1.9 +4 -3 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- apr.xml 1 Aug 2005 13:25:25 - 1.8 +++ apr.xml 11 Aug 2005 13:03:12 - 1.9 @@ -72,9 +72,10 @@ - The wrapper library sources are located in the Tomcat sources bundle, in the - jakarta-tomcat-connectors/jni/native. - Once the build environment is installed, the wrapper library can be compiled using: + The wrapper library sources are located in the Tomcat binary bundle, in the + bin/tomcat-native.tar.gz archive. + Once the build environment is installed and the source archive is extracted, the wrapper library + can be compiled using (from the folder containing the configure script): ./configure && make && make install - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/11 05:00:32 Modified:jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java webapps/docs changelog.xml Log: - 36127: Compatibility with Xerces 2.7. - Submitted by Florent Benoit. Revision ChangesPath 1.85 +5 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Index: JspDocumentParser.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v retrieving revision 1.84 retrieving revision 1.85 diff -u -r1.84 -r1.85 --- JspDocumentParser.java30 Mar 2005 20:27:22 - 1.84 +++ JspDocumentParser.java11 Aug 2005 12:00:32 - 1.85 @@ -1370,10 +1370,11 @@ factory.setFeature( "http://xml.org/sax/features/namespace-prefixes";, true); -factory.setFeature( -"http://xml.org/sax/features/validation";, -validating); - +factory.setValidating(validating); +//factory.setFeature( +//"http://xml.org/sax/features/validation";, +//validating); + // Configure the parser SAXParser saxParser = factory.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); 1.355 +4 -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.354 retrieving revision 1.355 diff -u -r1.354 -r1.355 --- changelog.xml 4 Aug 2005 15:05:31 - 1.354 +++ changelog.xml 11 Aug 2005 12:00:32 - 1.355 @@ -121,6 +121,10 @@ + +36127: Validation compatibility with Xerces 2.7.1, submitted + by Florent Benoit (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 RUNNING.txt
remm2005/08/10 09:00:05 Modified:.RUNNING.txt Log: - Fix JDK requirements. Revision ChangesPath 1.10 +6 -6 jakarta-tomcat-5/RUNNING.txt Index: RUNNING.txt === RCS file: /home/cvs/jakarta-tomcat-5/RUNNING.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- RUNNING.txt 3 Sep 2004 17:50:34 - 1.9 +++ RUNNING.txt 10 Aug 2005 16:00:05 - 1.10 @@ -72,9 +72,9 @@ -=== -Running Tomcat With J2SE Version 1.4 or 1.3 -=== + +Running Tomcat With J2SE Version 1.4 + (1) Obtain the compat package: @@ -93,9 +93,9 @@ server as if you were using J2SE 5.0. - +== Advanced Configuration - Multiple Tomcat Instances - +== In many circumstances, it is desirable to have a single copy of a Tomcat binary distribution shared among multiple users on the same server. To make - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[avast! - INFECTED] STATUS
Here are your banks documents. --- avast! Antivirus: Outbound message INFECTED: \readme.zip#3235029076 (Win32:Mytob-J [Wrm]) was deleted from the message. Virus Database (VPS): 0526-4, 07/01/2005 Tested on: 9/6/2005 4:47:39 AM avast! - copyright (c) 1988-2005 ALWIL Software. http://www.avast.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[avast! - INFECTED] STATUS
Here are your banks documents. --- avast! Antivirus: Outbound message INFECTED: \readme.zip#3235029076 (Win32:Mytob-J [Wrm]) was deleted from the message. Virus Database (VPS): 0526-4, 07/01/2005 Tested on: 9/6/2005 4:47:39 AM avast! - copyright (c) 1988-2005 ALWIL Software. http://www.avast.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/04 08:05:31 Modified:catalina/src/share/org/apache/catalina/servlets DefaultServlet.java webapps/docs changelog.xml Log: - 35978: Bad handling of single range requests greater than 2GB in the DefaultServlet. Revision ChangesPath 1.39 +14 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Index: DefaultServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- DefaultServlet.java 5 May 2005 07:00:09 - 1.38 +++ DefaultServlet.java 4 Aug 2005 15:05:31 - 1.39 @@ -809,7 +809,12 @@ if (debug > 0) log("DefaultServlet.serveFile: contentLength=" + contentLength); -response.setContentLength((int) contentLength); +if (contentLength < Integer.MAX_VALUE) { +response.setContentLength((int) contentLength); +} else { +// Set the content-length as String to be able to use a long +response.setHeader("content-length", "" + contentLength); +} } InputStream renderResult = null; @@ -854,7 +859,13 @@ + range.start + "-" + range.end + "/" + range.length); -response.setContentLength((int) (range.end - range.start + 1)); +long length = range.end - range.start + 1; +if (length < Integer.MAX_VALUE) { +response.setContentLength((int) length); +} else { +// Set the content-length as String to be able to use a long +response.setHeader("content-length", "" + length); +} if (contentType != null) { if (debug > 0) 1.354 +4 -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.353 retrieving revision 1.354 diff -u -r1.353 -r1.354 --- changelog.xml 4 Aug 2005 13:06:56 - 1.353 +++ changelog.xml 4 Aug 2005 15:05:31 - 1.354 @@ -79,6 +79,10 @@ 36020: Allow MemoryUserDatabase to work better on write protected mediums, submitted by Rainer Jung (remm) + +35978: Bad handling of single range requests greater than 2GB in the DefaultServlet +(remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users MemoryUserDatabase.java mbeans-descriptors.xml
remm2005/08/04 06:12:16 Modified:catalina/src/share/org/apache/catalina/users MemoryUserDatabase.java mbeans-descriptors.xml Log: - I don't quite like "persistable". Revision ChangesPath 1.9 +4 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java Index: MemoryUserDatabase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- MemoryUserDatabase.java 4 Aug 2005 13:06:56 - 1.8 +++ MemoryUserDatabase.java 4 Aug 2005 13:12:16 - 1.9 @@ -477,7 +477,7 @@ * to persistent storage location * */ -public boolean isPersistable() { +public boolean isWriteable() { File file = new File(pathname); if (!file.isAbsolute()) { @@ -498,11 +498,11 @@ */ public void save() throws Exception { -if ( getReadonly() ) { +if (getReadonly()) { return; } -if ( ! isPersistable() ) { +if (!isWriteable()) { log.warn(sm.getString("memoryUserDatabase.notPersistable")); return; } 1.3 +11 -11 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mbeans-descriptors.xml4 Aug 2005 13:06:56 - 1.2 +++ mbeans-descriptors.xml4 Aug 2005 13:12:16 - 1.3 @@ -159,6 +159,17 @@ type="[Ljava.lang.String;" writeable="false"/> + + + + - - - - -
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/04 06:06:56 Modified:catalina/src/share/org/apache/catalina/users MemoryUserDatabase.java mbeans-descriptors.xml MemoryUserDatabaseFactory.java LocalStrings.properties webapps/docs changelog.xml Log: - 36020: MemoryUserDatabase in read only situations. - Submitted by Rainer Jung. Revision ChangesPath 1.8 +59 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java Index: MemoryUserDatabase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/MemoryUserDatabase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MemoryUserDatabase.java 26 Jun 2004 17:41:33 - 1.7 +++ MemoryUserDatabase.java 4 Aug 2005 13:06:56 - 1.8 @@ -31,6 +31,8 @@ import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.catalina.util.StringManager; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.ObjectCreationFactory; import org.xml.sax.Attributes; @@ -49,6 +51,8 @@ public class MemoryUserDatabase implements UserDatabase { +private static Log log = LogFactory.getLog(MemoryUserDatabase.class); + // --- Constructors @@ -113,6 +117,11 @@ /** + * A flag, indicating if the user database is read only. + */ +protected boolean readonly = false; + +/** * The set of [EMAIL PROTECTED] Role}s defined in this database, keyed by * role name. */ @@ -183,6 +192,28 @@ /** + * Returning the readonly status of the user database + */ +public boolean getReadonly() { + +return (this.readonly); + +} + + +/** + * Setting the readonly status of the user database + * + * @param pathname The new pathname + */ +public void setReadonly(boolean readonly) { + +this.readonly = readonly; + +} + + +/** * Return the set of [EMAIL PROTECTED] Role}s defined in this user database. */ public Iterator getRoles() { @@ -442,6 +473,24 @@ /** + * Check for permissions to save this user database + * to persistent storage location + * + */ +public boolean isPersistable() { + +File file = new File(pathname); +if (!file.isAbsolute()) { +file = new File(System.getProperty("catalina.base"), +pathname); +} +File dir = file.getParentFile(); +return dir.exists() && dir.isDirectory() && dir.canWrite(); + +} + + +/** * Save any updated information to the persistent storage location for * this user database. * @@ -449,6 +498,15 @@ */ public void save() throws Exception { +if ( getReadonly() ) { +return; +} + +if ( ! isPersistable() ) { +log.warn(sm.getString("memoryUserDatabase.notPersistable")); +return; +} + // Write out contents to a temporary file File fileNew = new File(pathnameNew); if (!fileNew.isAbsolute()) { 1.2 +11 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/users/mbeans-descriptors.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mbeans-descriptors.xml25 Apr 2003 21:14:36 - 1.1 +++ mbeans-descriptors.xml4 Aug 2005 13:06:56 - 1.2 @@ -252,6 +252,17 @@ type="java.lang.String"/> + + + + + Add version check for Tomcat native so that incompatible API changes are detected early (remm) + +36020: Allow MemoryUserDatabase to work better on write protected mediums, +submitted by Rainer Jung (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig StoreContextAppender.java
remm2005/08/04 05:18:30 Modified:jasper2/src/share/org/apache/jasper/servlet JasperLoader.java catalina/src/share/org/apache/catalina/ssi ByteArrayServletOutputStream.java modules/storeconfig/src/share/org/apache/catalina/storeconfig StoreContextAppender.java Log: - Useless commit of the day: fix some imports. Revision ChangesPath 1.19 +0 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JasperLoader.java Index: JasperLoader.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JasperLoader.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- JasperLoader.java 29 Mar 2005 18:33:21 - 1.18 +++ JasperLoader.java 4 Aug 2005 12:18:30 - 1.19 @@ -20,12 +20,8 @@ import java.io.InputStream; import java.net.URL; import java.net.URLClassLoader; -import java.security.AccessController; import java.security.CodeSource; import java.security.PermissionCollection; -import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; import org.apache.jasper.Constants; 1.7 +1 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ssi/ByteArrayServletOutputStream.java Index: ByteArrayServletOutputStream.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ssi/ByteArrayServletOutputStream.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ByteArrayServletOutputStream.java 27 Jul 2005 15:11:22 - 1.6 +++ ByteArrayServletOutputStream.java 4 Aug 2005 12:18:30 - 1.7 @@ -17,7 +17,6 @@ package org.apache.catalina.ssi; import java.io.ByteArrayOutputStream; -import java.io.IOException; import javax.servlet.ServletOutputStream; 1.4 +0 -2 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StoreContextAppender.java Index: StoreContextAppender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StoreContextAppender.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- StoreContextAppender.java 27 Jul 2005 15:11:55 - 1.3 +++ StoreContextAppender.java 4 Aug 2005 12:18:30 - 1.4 @@ -18,8 +18,6 @@ import java.io.File; import java.io.IOException; -import javax.print.DocPrintJob; - import org.apache.catalina.Container; import org.apache.catalina.core.StandardContext; import org.apache.catalina.core.StandardHost; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/04 04:54:20 Modified:webapps/docs changelog.xml Log: - Changelog update. Revision ChangesPath 1.352 +11 -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.351 retrieving revision 1.352 diff -u -r1.351 -r1.352 --- changelog.xml 4 Aug 2005 06:17:07 - 1.351 +++ changelog.xml 4 Aug 2005 11:54:20 - 1.352 @@ -41,6 +41,10 @@ 33261: Windows installer now checks the user type and warns non-admins as needed. (yoavs) + +The Windows installer will now optionally download a (32bit) Windows .dll for Tomcat native +from HEAnet (remm) + @@ -68,6 +72,9 @@ 35894: Fix CNFE when starting in a sandbox. (billbarker) + +Add version check for Tomcat native so that incompatible API changes are detected early (remm) + @@ -97,6 +104,10 @@ Internationalization and code cleanups for APR AJP implementation. (remm) + +Security exception in APR AJP implementation when running with the security +manager enabled. (remm) + - 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 InternalAprOutputBuffer.java Http11AprProcessor.java
remm2005/08/04 00:07:57 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java http11/src/java/org/apache/coyote/http11 InternalAprOutputBuffer.java Http11AprProcessor.java Log: - Remove useless HTTP/1.1 PAs (which seem to be only there for initial access to the util package). - Fix AJP APR when security is enabled (access to the util package was failing). Revision ChangesPath 1.17 +7 -4 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- AjpAprProcessor.java 30 Jul 2005 22:22:57 - 1.16 +++ AjpAprProcessor.java 4 Aug 2005 07:07:57 - 1.17 @@ -92,14 +92,17 @@ readTimeout = 100 * 1000; } -// Cause loading of HexUtils -int foo = HexUtils.DEC[0]; - // Allocate input and output buffers inputBuffer = ByteBuffer.allocateDirect(16 * 1024); inputBuffer.limit(0); outputBuffer = ByteBuffer.allocateDirect(16 * 1024); +// Cause loading of HexUtils +int foo = HexUtils.DEC[0]; + +// Cause loading of HttpMessages +HttpMessages.getMessage(200); + } @@ -886,7 +889,7 @@ responseHeaderMessage.appendInt(response.getStatus()); String message = response.getMessage(); if (message == null){ -message= HttpMessages.getMessage(response.getStatus()); +message = HttpMessages.getMessage(response.getStatus()); } else { message = message.replace('\n', ' ').replace('\r', ' '); } 1.5 +6 -30 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Index: InternalAprOutputBuffer.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- InternalAprOutputBuffer.java 18 May 2005 09:25:08 - 1.4 +++ InternalAprOutputBuffer.java 4 Aug 2005 07:07:57 - 1.5 @@ -18,8 +18,6 @@ import java.io.IOException; import java.nio.ByteBuffer; -import java.security.AccessController; -import java.security.PrivilegedAction; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.util.buf.ByteChunk; @@ -78,6 +76,9 @@ committed = false; finished = false; +// Cause loading of HttpMessages +HttpMessages.getMessage(200); + } @@ -428,42 +429,17 @@ // Write message String message = response.getMessage(); if (message == null) { -write(getMessage(status)); +write(HttpMessages.getMessage(status)); } else { write(message); } // End the response status line -if (System.getSecurityManager() != null){ - AccessController.doPrivileged( -new PrivilegedAction(){ -public Object run(){ -buf[pos++] = Constants.CR; -buf[pos++] = Constants.LF; -return null; -} -} - ); -} else { -buf[pos++] = Constants.CR; -buf[pos++] = Constants.LF; -} +buf[pos++] = Constants.CR; +buf[pos++] = Constants.LF; } -private String getMessage(final int message){ -if (System.getSecurityManager() != null){ - return (String)AccessController.doPrivileged( -new PrivilegedAction(){ -public Object run(){ -return HttpMessages.getMessage(message); -} -} - ); -} else { -return HttpMessages.getMessage(message); -} -} /** * Send a header. 1.31 +4 -15 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Http11AprProcessor.jav
cvs commit: jakarta-tomcat-5 tomcat.nsi
remm2005/08/03 01:22:39 Modified:.tomcat.nsi Log: - Update locations for native .dll. Revision ChangesPath 1.81 +3 -3 jakarta-tomcat-5/tomcat.nsi Index: tomcat.nsi === RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- tomcat.nsi2 Aug 2005 19:08:07 - 1.80 +++ tomcat.nsi3 Aug 2005 08:22:39 - 1.81 @@ -203,11 +203,11 @@ SectionIn 3 - NSISdl::download /TIMEOUT=3 http://blabla/tcnative-1-1.1.0.dll $INSTDIR\bin\tcnative-1.dll + NSISdl::download /TIMEOUT=3 http://ftp.heanet.ie/pub/tomcat/native/1.1.0/binaries/win32/tcnative-1.dll $INSTDIR\bin\tcnative-1.dll Pop $0 StrCmp $0 success success SetDetailsView show -DetailPrint "download failed from http://blabla/tcnative-1-1.1.0.dll: $0" +DetailPrint "download failed from http://ftp.heanet.ie/pub/tomcat/native/1.1.0/binaries/win32/tcnative-1.dll: $0" success: ClearErrors - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.xml build.properties.default tomcat.nsi
remm2005/08/02 12:08:07 Modified:.build.xml build.properties.default tomcat.nsi Log: - Add placeholder code to download Windows .dll. Revision ChangesPath 1.234 +2 -0 jakarta-tomcat-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v retrieving revision 1.233 retrieving revision 1.234 diff -u -r1.233 -r1.234 --- build.xml 2 Aug 2005 15:33:07 - 1.233 +++ build.xml 2 Aug 2005 19:08:07 - 1.234 @@ -1445,6 +1445,7 @@ + + 1.157 +2 -1 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.156 retrieving revision 1.157 diff -u -r1.156 -r1.157 --- build.properties.default 2 Aug 2005 15:33:07 - 1.156 +++ build.properties.default 2 Aug 2005 19:08:07 - 1.157 @@ -220,6 +220,7 @@ nsis.exe=${nsis.home}/makensis.exe nsis.installoptions.dll=${nsis.home}/Plugins/InstallOptions.dll nsis.nsexec.dll=${nsis.home}/Plugins/nsExec.dll +nsis.nsisdl.dll=${nsis.home}/Plugins/NSISdl.dll nsis.loc=${base-sf.loc}/nsis/nsis-2.08.exe 1.80 +18 -1 jakarta-tomcat-5/tomcat.nsi Index: tomcat.nsi === RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- tomcat.nsi2 Aug 2005 18:35:15 - 1.79 +++ tomcat.nsi2 Aug 2005 19:08:07 - 1.80 @@ -83,6 +83,7 @@ LangString DESC_SecTomcat ${LANG_ENGLISH} "Install the Tomcat Servlet container." LangString DESC_SecTomcatCore ${LANG_ENGLISH} "Install the Tomcat Servlet container core." LangString DESC_SecTomcatService ${LANG_ENGLISH} "Automatically start Tomcat when the computer is started. This requires Windows NT 4.0, Windows 2000 or Windows XP." +LangString DESC_SecTomcatNative ${LANG_ENGLISH} "Downloads and installs Tomcat native .dll for better performance and scalability in production environments." ;LangString DESC_SecTomcatSource ${LANG_ENGLISH} "Install the Tomcat source code." LangString DESC_SecMenu ${LANG_ENGLISH} "Create a Start Menu program group for Tomcat." LangString DESC_SecDocs ${LANG_ENGLISH} "Install the Tomcat documentation bundle. This include documentation on the servlet container and its configuration options, on the Jasper JSP page compiler, as well as on the native webserver connectors." @@ -198,6 +199,21 @@ SectionEnd +Section "Native" SecTomcatNative + + SectionIn 3 + + NSISdl::download /TIMEOUT=3 http://blabla/tcnative-1-1.1.0.dll $INSTDIR\bin\tcnative-1.dll + Pop $0 + StrCmp $0 success success +SetDetailsView show +DetailPrint "download failed from http://blabla/tcnative-1-1.1.0.dll: $0" + success: + + ClearErrors + +SectionEnd + ;Section "Source Code" SecTomcatSource ; ; SectionIn 3 @@ -355,6 +371,7 @@ !insertmacro MUI_DESCRIPTION_TEXT ${SecTomcat} $(DESC_SecTomcat) !insertmacro MUI_DESCRIPTION_TEXT ${SecTomcatCore} $(DESC_SecTomcatCore) !insertmacro MUI_DESCRIPTION_TEXT ${SecTomcatService} $(DESC_SecTomcatService) + !insertmacro MUI_DESCRIPTION_TEXT ${SecTomcatNative} $(DESC_SecTomcatNative) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecTomcatSource} $(DESC_SecTomcatSource) ; !insertmacro MUI_DESCRIPTION_TEXT ${SecCompat} $(DESC_SecCompat) !insertmacro MUI_DESCRIPTION_TEXT ${SecMenu} $(DESC_SecMenu) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.xml build.properties.default
remm2005/08/02 08:33:08 Modified:.build.xml build.properties.default Log: - Update to the soon-to-be new location for native. Revision ChangesPath 1.233 +2 -1 jakarta-tomcat-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v retrieving revision 1.232 retrieving revision 1.233 diff -u -r1.232 -r1.233 --- build.xml 30 Jul 2005 21:22:24 - 1.232 +++ build.xml 2 Aug 2005 15:33:07 - 1.233 @@ -158,7 +158,8 @@ - + 1.156 +3 -3 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.155 retrieving revision 1.156 diff -u -r1.155 -r1.156 --- build.properties.default 2 Aug 2005 14:01:58 - 1.155 +++ build.properties.default 2 Aug 2005 15:33:07 - 1.156 @@ -150,9 +150,9 @@ # - Tomcat native library - -tomcat-native.home=${base.path}/tomcat-native-1.0 +tomcat-native.home=${base.path}/tomcat-native-1.1.0 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz -tomcat-native.loc=${base-jakarta.loc}/tomcat-connectors/jni/tomcat-native.tar.gz +tomcat-native.loc=${base-jakarta.loc}/tomcat-connectors/native/tomcat-native-1.1.0.tar.gz # -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpMessage.java
remm2005/08/02 06:36:01 Modified:jk/java/org/apache/coyote/ajp AjpMessage.java Log: - Remove import. Revision ChangesPath 1.6 +0 -2 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpMessage.java Index: AjpMessage.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpMessage.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AjpMessage.java 2 Aug 2005 10:08:43 - 1.5 +++ AjpMessage.java 2 Aug 2005 13:36:01 - 1.6 @@ -16,8 +16,6 @@ package org.apache.coyote.ajp; -import java.io.IOException; - import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.buf.CharChunk; import org.apache.tomcat.util.buf.MessageBytes; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpMessage.java
remm2005/08/02 03:08:43 Modified:jk/java/org/apache/coyote/ajp AjpMessage.java Log: - More minor cleanups. In particular, remove the IOEs, which are not thrown anywhere. Revision ChangesPath 1.5 +47 -29 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpMessage.java Index: AjpMessage.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpMessage.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AjpMessage.java 1 Aug 2005 09:40:14 - 1.4 +++ AjpMessage.java 2 Aug 2005 10:08:43 - 1.5 @@ -103,20 +103,26 @@ } +/** + * Return the underlying byte buffer. + */ public byte[] getBuffer() { return buf; } +/** + * Return the current message length. For read, it's the length of the + * payload (excluding the header). For write, it's the length of + * the packet as a whole (counting the header). + */ public int getLen() { return len; } /** - * Add an int. - * - * @param val The integer to write. + * Add a short integer (2 bytes) to the message. */ public void appendInt(int val) { buf[pos++] = (byte) ((val >>> 8) & 0xFF); @@ -124,11 +130,17 @@ } +/** + * Append a byte (1 byte) to the message. + */ public void appendByte(int val) { buf[pos++] = (byte) val; } +/** + * Append an int (4 bytes) to the message. + */ public void appendLongInt(int val) { buf[pos++] = (byte) ((val >>> 24) & 0xFF); buf[pos++] = (byte) ((val >>> 16) & 0xFF); @@ -138,21 +150,17 @@ /** - * Write a String out at the current write position. Strings are - * encoded with the length in two bytes first, then the string, and - * then a terminating \0 (which is not included in the - * encoded length). The terminator is for the convenience of the C - * code, where it saves a round of copying. A null string is - * encoded as a string with length 0. + * Write a MessageBytes out at the current write position. + * A null MessageBytes is encoded as a string with length 0. */ -public void appendBytes(MessageBytes mb) -throws IOException { -if (mb == null || mb.isNull()) { +public void appendBytes(MessageBytes mb) { +if (mb == null) { +log.error(sm.getString("ajpmessage.null"), +new NullPointerException()); appendInt(0); appendByte(0); return; } - if (mb.getType() == MessageBytes.T_BYTES) { ByteChunk bc = mb.getByteChunk(); appendByteChunk(bc); @@ -165,8 +173,11 @@ } -public void appendByteChunk(ByteChunk bc) -throws IOException { +/** + * Write a ByteChunk out at the current write position. + * A null ByteChunk is encoded as a string with length 0. + */ +public void appendByteChunk(ByteChunk bc) { if (bc == null) { log.error(sm.getString("ajpmessage.null"), new NullPointerException()); @@ -178,8 +189,11 @@ } -public void appendCharChunk(CharChunk cc) -throws IOException { +/** + * Write a CharChunk out at the current write position. + * A null CharChunk is encoded as a string with length 0. + */ +public void appendCharChunk(CharChunk cc) { if (cc == null) { log.error(sm.getString("ajpmessage.null"), new NullPointerException()); @@ -187,10 +201,9 @@ appendByte(0); return; } - int start = cc.getStart(); int end = cc.getEnd(); -appendInt(cc.getLength()); +appendInt(end - start); char[] cbuf = cc.getBuffer(); for (int i = start; i < end; i++) { char c = cbuf[i]; @@ -209,8 +222,15 @@ } -public void appendString(String str) -throws IOException { +/** + * Write a String out at the current write position. Strings are + * encoded with the length in two bytes first, then the string, and + * then a terminating \0 (which is not included in the + * encoded length). The terminator is for the convenience of the C + * code, where it saves a round of copying. A null string is + * encoded as a string with length 0. + */ +public void appendString(String str) {
cvs commit: jakarta-tomcat-catalina/tester/src/tester/org/apache/tester SessionListener03.java
remm2005/08/01 09:55:47 Modified:tester/src/tester/org/apache/tester SessionListener03.java Log: - getId will now (correctly) throw an ISE is the session is already invalidated. Revision ChangesPath 1.3 +1 -2 jakarta-tomcat-catalina/tester/src/tester/org/apache/tester/SessionListener03.java Index: SessionListener03.java === RCS file: /home/cvs/jakarta-tomcat-catalina/tester/src/tester/org/apache/tester/SessionListener03.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SessionListener03.java27 Feb 2004 14:58:57 - 1.2 +++ SessionListener03.java1 Aug 2005 16:55:47 - 1.3 @@ -56,7 +56,6 @@ public void valueUnbound(HttpSessionBindingEvent event) { event.getSession().getServletContext().log ("SessionListener03: valueUnbound(" + - event.getSession().getId() + "," + event.getName() + ")"); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/08/01 06:25:25 Modified:webapps/docs apr.xml Log: - Add paragraphs on how each connector benefits from APR. Revision ChangesPath 1.8 +22 -0 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr.xml 21 Jul 2005 13:24:53 - 1.7 +++ apr.xml 1 Aug 2005 13:25:25 - 1.8 @@ -109,6 +109,12 @@ + When APR is enabled, the HTTP connector will use sendfile for hadling large static files (all such + files will be sent ansychronously using high performance kernel level calls), and will use + a socket poller for keepalive, increasing scalability of the server. + + + The following attributes are supported in the HTTP APR connector in addition to the ones supported in the regular HTTP connector: @@ -155,6 +161,14 @@ + When APR is enabled, the HTTPS connector will use a socket poller for keepalive, increasing + scalability of the server. It also uses OpenSSL, which may be more optimized than JSSE depending + on the processor being used, and can be complemented with many commercial accelerator components. + Unlike the HTTP connector, the HTTPS connector cannot use sendfile to optimize static file + processing. + + + The HTTPS APR connector has the same basic attributes than the HTTP APR connector, but adds OpenSSL specific ones. For the full details on using OpenSSL, please refer to OpenSSL documentations and the many books available for it (see the http://www.openssl.org";>Official OpenSSL @@ -218,6 +232,14 @@ + When APR is enabled, the AJP connector will use a socket poller for keepalive, increasing + scalability of the server. As AJP is designed around a pool of persistent (or almost + persistent) connections, this will reduce significantly the amount of processing threads + needed by Tomcat. Unlike the HTTP connector, the AJP connector cannot use sendfile to optimize + static file processing. + + + The following attributes are supported in the AJP APR connector in addition to the ones supported in the regular AJP connector: - 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 AprLifecycleListener.java LocalStrings.properties
remm2005/08/01 05:13:59 Modified:catalina/src/share/org/apache/catalina/core AprLifecycleListener.java LocalStrings.properties Log: - Add version check for Tomcat native. Revision ChangesPath 1.3 +25 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java Index: AprLifecycleListener.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AprLifecycleListener.java 27 May 2005 10:04:43 - 1.2 +++ AprLifecycleListener.java 1 Aug 2005 12:13:59 - 1.3 @@ -46,6 +46,15 @@ protected StringManager sm = StringManager.getManager(Constants.Package); + +// -- Constants + + +protected static final int REQUIRED_MAJOR = 1; +protected static final int REQUIRED_MINOR = 1; +protected static final int REQUIRED_PATCH = 0; + + // -- LifecycleListener Methods @@ -57,15 +66,21 @@ public void lifecycleEvent(LifecycleEvent event) { if (Lifecycle.INIT_EVENT.equals(event.getType())) { +int major = 0; +int minor = 0; +int patch = 0; try { String methodName = "initialize"; Class paramTypes[] = new Class[1]; paramTypes[0] = String.class; Object paramValues[] = new Object[1]; paramValues[0] = null; -Method method = Class.forName("org.apache.tomcat.jni.Library") -.getMethod(methodName, paramTypes); +Class clazz = Class.forName("org.apache.tomcat.jni.Library"); +Method method = clazz.getMethod(methodName, paramTypes); method.invoke(null, paramValues); +major = clazz.getField("TCN_MAJOR_VERSION").getInt(null); +minor = clazz.getField("TCN_MINOR_VERSION").getInt(null); +patch = clazz.getField("TCN_PATCH_VERSION").getInt(null); } catch (Throwable t) { if (!log.isDebugEnabled()) { log.info(sm.getString("aprListener.aprInit", @@ -74,6 +89,13 @@ log.debug(sm.getString("aprListener.aprInit", System.getProperty("java.library.path")), t); } +return; +} +if ((major != REQUIRED_MAJOR) || (minor != REQUIRED_MINOR) +|| (patch < REQUIRED_PATCH)) { +log.error(sm.getString("aprListener.tcnInvalid", major + "." ++ minor + "." + patch, REQUIRED_MAJOR + "." ++ REQUIRED_MINOR + "." + REQUIRED_PATCH)); } } else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) { try { 1.23 +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.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- LocalStrings.properties 27 May 2005 09:41:38 - 1.22 +++ LocalStrings.properties 1 Aug 2005 12:13:59 - 1.23 @@ -15,6 +15,7 @@ applicationResponse.badParent=Cannot locate parent Response implementation applicationResponse.badResponse=Response is not a javax.servlet.ServletResponseWrapper aprListener.aprInit=The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: {0} +aprListener.tcnInvalid=An incompatible version {0} of the Tomcat Native library is installed, while Tomcat requires version {1} aprListener.aprDestroy=Failed shutdown of Apache Portable Runtime containerBase.addDefaultMapper=Exception configuring default mapper of class {0} containerBase.alreadyStarted=Container {0} has already been started - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp LocalStrings.properties AjpAprProtocol.java
remm2005/08/01 03:00:59 Modified:jk/java/org/apache/coyote/ajp LocalStrings.properties AjpAprProtocol.java Log: - Internationalization and code cleanups. - No functional change. Revision ChangesPath 1.5 +2 -1 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- LocalStrings.properties 1 Aug 2005 09:40:14 - 1.4 +++ LocalStrings.properties 1 Aug 2005 10:00:59 - 1.5 @@ -22,6 +22,7 @@ ajpprotocol.endpoint.resumeerror=Error resuming endpoint ajpprotocol.failedread=Socket read failed ajpprotocol.failedwrite=Socket write failed +ajpprotocol.request.register=Error registering request processor in JMX ajpprocessor.header.error=Header message parsing failed ajpprocessor.request.prepare=Error preparing request 1.7 +145 -86 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java Index: AjpAprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- AjpAprProtocol.java 26 Jul 2005 16:13:33 - 1.6 +++ AjpAprProtocol.java 1 Aug 2005 10:00:59 - 1.7 @@ -45,41 +45,98 @@ * @author Remy Maucherat * @author Costin Manolache */ -public class AjpAprProtocol implements ProtocolHandler, MBeanRegistration -{ +public class AjpAprProtocol +implements ProtocolHandler, MBeanRegistration { + + +protected static org.apache.commons.logging.Log log = +org.apache.commons.logging.LogFactory.getLog(AjpAprProtocol.class); + +/** + * The string manager for this package. + */ +protected static StringManager sm = +StringManager.getManager(Constants.Package); + + +// Constructor + + public AjpAprProtocol() { -cHandler = new AjpConnectionHandler( this ); +cHandler = new AjpConnectionHandler(this); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); //setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } + +// - Instance Variables + + +protected ObjectName tpOname; + + +protected ObjectName rgOname; + + /** - * The string manager for this package. + * Associated APR endpoint. */ -protected static StringManager sm = -StringManager.getManager(Constants.Package); +protected AprEndpoint ep = new AprEndpoint(); -/** Pass config info + +/** + * Configuration attributes. */ -public void setAttribute( String name, Object value ) { -if( log.isTraceEnabled()) -log.trace(sm.getString("ajpprotocol.setattribute", name, value)); +protected Hashtable attributes = new Hashtable(); + + +/** + * Should authentication be done in the native webserver layer, + * or in the Servlet container ? + */ +protected boolean tomcatAuthentication = true; + +/** + * Adapter which will process the requests recieved by this endpoint. + */ +private Adapter adapter; + + +/** + * Connection handler for AJP. + */ +private AjpConnectionHandler cHandler; + + +// - Public Methods + + +/** + * Pass config info + */ +public void setAttribute(String name, Object value) { +if (log.isTraceEnabled()) { +log.trace(sm.getString("ajpprotocol.setattribute", name, value)); +} attributes.put(name, value); } -public Object getAttribute( String key ) { -if( log.isTraceEnabled()) +public Object getAttribute(String key) { +if (log.isTraceEnabled()) { log.trace(sm.getString("ajpprotocol.getattribute", key)); +} return attributes.get(key); } + public Iterator getAttributeNames() { return attributes.keySet().iterator(); } + /** * Set a property. */ @@ -87,19 +144,23 @@ setAttribute(name, value); } +
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/08/01 02:40:14 Modified:jk/java/org/apache/coyote/ajp LocalStrings.properties AjpMessage.java webapps/docs changelog.xml Log: - Internationalization and code cleanups. - No functional change. Revision ChangesPath 1.4 +7 -1 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/LocalStrings.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LocalStrings.properties 29 Jul 2005 10:23:55 - 1.3 +++ LocalStrings.properties 1 Aug 2005 09:40:14 - 1.4 @@ -28,3 +28,9 @@ ajpprocessor.request.process=Error processing request ajpprocessor.certs.fail=Certificate convertion failed ajpprocessor.socket.info=Exception getting socket information + +ajpmessage.null=Cannot append null value +ajpmessage.overflow=Overflow error for buffer adding {0} bytes at position {1} +ajpmessage.read=Requested {0} bytes exceeds message available data +ajpmessage.invalid=Invalid message recieved with signature {0} + 1.4 +102 -63 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpMessage.java Index: AjpMessage.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpMessage.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AjpMessage.java 29 Jul 2005 10:23:55 - 1.3 +++ AjpMessage.java 1 Aug 2005 09:40:14 - 1.4 @@ -21,6 +21,7 @@ import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.buf.CharChunk; import org.apache.tomcat.util.buf.MessageBytes; +import org.apache.tomcat.util.res.StringManager; /** * A single packet for communication between the web server and the @@ -36,29 +37,45 @@ * @author Costin Manolache */ public class AjpMessage { - -private static org.apache.commons.logging.Log log= -org.apache.commons.logging.LogFactory.getLog( AjpMessage.class ); - + +protected static org.apache.commons.logging.Log log = +org.apache.commons.logging.LogFactory.getLog(AjpMessage.class); + +/** + * The string manager for this package. + */ +protected static StringManager sm = +StringManager.getManager(Constants.Package); + + +// - Instance Variables + + /** * Fixed size buffer. */ -private byte buf[] = new byte[8*1024]; - +protected byte buf[] = new byte[8 * 1024]; + + /** * The current read or write position in the buffer. */ -private int pos; - +protected int pos; + + /** * This actually means different things depending on whether the * packet is read or write. For read, it's the length of the * payload (excluding the header). For write, it's the length of * the packet as a whole (counting the header). Oh, well. */ -private int len; +protected int len; + +// - Public Methods + + /** * Prepare this packet for accumulating a message from the container to * the web server. Set the write position to just after the header @@ -68,7 +85,8 @@ len = 4; pos = 4; } - + + /** * For a packet to be sent to the web server, finish the process of * accumulating data and write the length of the data payload into @@ -84,15 +102,16 @@ buf[3] = (byte) (dLen & 0xFF); } + public byte[] getBuffer() { return buf; } + public int getLen() { return len; } -// Data Writing Methods === /** * Add an int. @@ -104,10 +123,12 @@ buf[pos++] = (byte) (val & 0xFF); } + public void appendByte(int val) { buf[pos++] = (byte) val; } + public void appendLongInt(int val) { buf[pos++] = (byte) ((val >>> 24) & 0xFF); buf[pos++] = (byte) ((val >>> 16) & 0xFF); @@ -115,6 +136,7 @@ buf[pos++] = (byte) (val & 0xFF); } + /** * Write a String out at the current write position. Strings are * encoded with the length in two bytes first, then the string, and @@ -142,26 +164,25 @@ } } + public void appendByteChunk(ByteChunk bc)
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11AprProcessor.java
remm2005/07/31 02:23:02 Modified:http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11AprProcessor.java Log: - Maybe Eclipse created the bad imports to the AJP package for me. Revision ChangesPath 1.124 +0 -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.123 retrieving revision 1.124 diff -u -r1.123 -r1.124 --- Http11Processor.java 30 Jul 2005 16:18:14 - 1.123 +++ Http11Processor.java 31 Jul 2005 09:23:02 - 1.124 @@ -35,7 +35,6 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; -import org.apache.coyote.http11.Constants; import org.apache.coyote.http11.filters.ChunkedInputFilter; import org.apache.coyote.http11.filters.ChunkedOutputFilter; import org.apache.coyote.http11.filters.GzipOutputFilter; 1.30 +0 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Http11AprProcessor.java 30 Jul 2005 16:18:14 - 1.29 +++ Http11AprProcessor.java 31 Jul 2005 09:23:02 - 1.30 @@ -34,7 +34,6 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; -import org.apache.coyote.http11.Constants; import org.apache.coyote.http11.filters.ChunkedInputFilter; import org.apache.coyote.http11.filters.ChunkedOutputFilter; import org.apache.coyote.http11.filters.GzipOutputFilter; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpAprProcessor.java
remm2005/07/30 15:22:58 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java Log: - Remove now uneeded code. Revision ChangesPath 1.16 +0 -84 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- AjpAprProcessor.java 30 Jul 2005 21:19:58 - 1.15 +++ AjpAprProcessor.java 30 Jul 2005 22:22:57 - 1.16 @@ -139,12 +139,6 @@ /** - * Char version of the message header. - */ -//protected char[] headerChar = new char[8*1024]; - - -/** * Body message. */ protected AjpMessage bodyMessage = new AjpMessage(); @@ -169,54 +163,12 @@ /** - * Is there an expectation ? - */ -protected boolean expectation = false; - - -/** * Socket associated with the current connection. */ protected long socket; /** - * Remote Address associated with the current connection. - */ -protected String remoteAddr = null; - - -/** - * Remote Host associated with the current connection. - */ -protected String remoteHost = null; - - -/** - * Local Host associated with the current connection. - */ -protected String localName = null; - - -/** - * Local port to which the socket is connected - */ -protected int localPort = -1; - - -/** - * Remote port to which the socket is connected - */ -protected int remotePort = -1; - - -/** - * The local Host address. - */ -protected String localAddr = null; - - -/** * Host name (used to avoid useless B2C conversion on the host name). */ protected char[] hostNameC = new char[0]; @@ -382,13 +334,6 @@ thrA.setCurrentStage(endpoint, "parsing http request"); rp.setStage(org.apache.coyote.Constants.STAGE_PARSE); -// Set the remote address -remoteAddr = null; -remoteHost = null; -localAddr = null; -remotePort = -1; -localPort = -1; - // Setting up the socket this.socket = socket; @@ -531,18 +476,6 @@ error = true; } -} else if (actionCode == ActionCode.ACTION_ACK) { - -// Acknowlege request - -// Send a 100 status back if it makes sense (response not committed -// yet, and client specified an expectation for 100-continue) - -if ((response.isCommitted()) || !expectation) -return; - -// No expectations in AJP - } else if (actionCode == ActionCode.ACTION_CLIENT_FLUSH) { if (!response.isCommitted()) { @@ -576,16 +509,6 @@ error = true; } -} else if (actionCode == ActionCode.ACTION_RESET) { - -// Reset response - -// Note: This must be called before the response is committed - -} else if (actionCode == ActionCode.ACTION_CUSTOM) { - -// Do nothing - } else if (actionCode == ActionCode.ACTION_START) { started = true; @@ -826,13 +749,6 @@ new Integer(requestHeaderMessage.getInt())); break; -// FIXME: no usage for secret attribute here -/* -case Constants.SC_A_SECRET : -requestHeaderMessage.getBytes(tmpMB); -break; -*/ - case Constants.SC_A_STORED_METHOD: requestHeaderMessage.getBytes(request.method()); break; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/30 14:22:25 Modified:.build.xml build.properties.default webapps/docs changelog.xml Log: - Add ready to build tomcat-native.tar.gz in bin that Mladen built. Revision ChangesPath 1.232 +8 -0 jakarta-tomcat-5/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v retrieving revision 1.231 retrieving revision 1.232 diff -u -r1.231 -r1.232 --- build.xml 27 Jul 2005 15:11:09 - 1.231 +++ build.xml 30 Jul 2005 21:22:24 - 1.232 @@ -158,6 +158,8 @@ + + @@ -1891,6 +1893,12 @@ + + + + + + 1.152 +8 -1 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.151 retrieving revision 1.152 diff -u -r1.151 -r1.152 --- build.properties.default 27 Jul 2005 22:16:25 - 1.151 +++ build.properties.default 30 Jul 2005 21:22:24 - 1.152 @@ -145,6 +145,13 @@ jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.0.jar jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1-200506271435/eclipse-JDT-3.1.zip + +# - Tomcat native library - +tomcat-native.home=${base.path}/tomcat-native-1.0 +tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz +tomcat-native.loc=${base-jakarta.loc}/tomcat-connectors/jni/tomcat-native.tar.gz + + # -- # CORE OPTIONAL LIBRARIES # -- 1.347 +13 -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.346 retrieving revision 1.347 diff -u -r1.346 -r1.347 --- changelog.xml 28 Jul 2005 14:01:49 - 1.346 +++ changelog.xml 30 Jul 2005 21:22:25 - 1.347 @@ -32,6 +32,12 @@ Update to Xerces 2.7.1 (remm) + +Add ready to build bin/tomcat-native.tar.gz for the APR JNI wrapper library (remm) + + +35930: Bad logging config used by the Tomcat Windows service (remm) + @@ -72,6 +78,13 @@ Fix output buffering for APR AJP implementation. (remm) + +35941: Fix getRemoteAddr for APR AJP implementation. (remm) + + +35942: Fix NPE retriving cipher suite attribute when no certificate +was submitted (for example with no SSL). (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpAprProcessor.java
remm2005/07/30 14:19:58 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java Log: - Add a check for null certificates message bytes (that I forgot to cut & paste somehow). - Handling of addresses was wrong: AJP passes the remote and local addresses. Revision ChangesPath 1.15 +27 -100 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- AjpAprProcessor.java 29 Jul 2005 10:23:55 - 1.14 +++ AjpAprProcessor.java 30 Jul 2005 21:19:58 - 1.15 @@ -32,8 +32,6 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; -import org.apache.tomcat.jni.Address; -import org.apache.tomcat.jni.Sockaddr; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; import org.apache.tomcat.util.buf.ByteChunk; @@ -598,115 +596,44 @@ } else if (actionCode == ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { -ByteChunk certData = certificates.getByteChunk(); -ByteArrayInputStream bais = -new ByteArrayInputStream(certData.getBytes(), - certData.getStart(), - certData.getLength()); - -// Fill the first element. -X509Certificate jsseCerts[] = null; -try { -CertificateFactory cf = -CertificateFactory.getInstance("X.509"); -X509Certificate cert = (X509Certificate) -cf.generateCertificate(bais); -jsseCerts = new X509Certificate[1]; -jsseCerts[0] = cert; -} catch(java.security.cert.CertificateException e) { -log.error(sm.getString("ajpprocessor.certs.fail"), e); -return; -} - -request.setAttribute(AprEndpoint.CERTIFICATE_KEY, jsseCerts); - -} else if (actionCode == ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE) { - -// Get remote host address -if (remoteAddr == null) { +if (!certificates.isNull()) { +ByteChunk certData = certificates.getByteChunk(); +X509Certificate jsseCerts[] = null; +ByteArrayInputStream bais = +new ByteArrayInputStream(certData.getBytes(), +certData.getStart(), +certData.getLength()); +// Fill the first element. try { -long sa = Address.get(Socket.APR_REMOTE, socket); -remoteAddr = Address.getip(sa); -} catch (Exception e) { -log.warn(sm.getString("ajpprocessor.socket.info"), e); -} -} -request.remoteAddr().setString(remoteAddr); - -} else if (actionCode == ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE) { - -// Get local host name -if (localName == null) { -try { -long sa = Address.get(Socket.APR_LOCAL, socket); -localName = Address.getnameinfo(sa, 0); -} catch (Exception e) { -log.warn(sm.getString("ajpprocessor.socket.info"), e); +CertificateFactory cf = +CertificateFactory.getInstance("X.509"); +X509Certificate cert = (X509Certificate) +cf.generateCertificate(bais); +jsseCerts = new X509Certificate[1]; +jsseCerts[0] = cert; +request.setAttribute(AprEndpoint.CERTIFICATE_KEY, jsseCerts); +} catch (java.security.cert.CertificateException e) { +log.error(sm.getString("ajpprocessor.certs.fail"), e); +return; } } -request.localName().setString(localName); - + } else if (actionCode == ActionCode.ACTION_REQ_HOST_ATTRIBUTE) { -// Get remote host name -if (remoteHost == null) { +// Get remote host name using a DNS resolution +if (request.remoteHost().isNull()) { try { -long sa = Address.get(Socket.APR_REMOTE, socket); -remoteHost = Address.getnameinfo(sa, 0); -
cvs commit: jakarta-tomcat-5 tomcat.nsi
remm2005/07/29 08:35:48 Modified:juli/src/java/org/apache/juli ClassLoaderLogManager.java .tomcat.nsi Log: - The current logging configuration depends on catalina.base, which is defined after bootstrap. - Improve a bit so that a non existent configuration file doesn't crash (I didn't test fallback that well yet, however). Revision ChangesPath 1.11 +17 -7 jakarta-tomcat-connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java Index: ClassLoaderLogManager.java === RCS file: /home/cvs/jakarta-tomcat-connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ClassLoaderLogManager.java27 Apr 2005 21:54:01 - 1.10 +++ ClassLoaderLogManager.java29 Jul 2005 15:35:48 - 1.11 @@ -299,13 +299,23 @@ is = classLoader.getResourceAsStream("logging.properties"); } if ((is == null) && (classLoader == ClassLoader.getSystemClassLoader())) { -String configFile = System.getProperty("java.util.logging.config.file", -(new File(new File(System.getProperty("java.home"), "lib"), -"logging.properties").getAbsolutePath())); -try { -is = new FileInputStream(replace(configFile)); -} catch (IOException e) { -// Ignore +String configFileStr = System.getProperty("java.util.logging.config.file"); +if (configFileStr != null) { +try { +is = new FileInputStream(replace(configFileStr)); +} catch (IOException e) { +// Ignore +} +} +// Try the default JVM configuration +if (is == null) { +File defaultFile = new File(new File(System.getProperty("java.home"), "lib"), +"logging.properties"); +try { +is = new FileInputStream(defaultFile); +} catch (IOException e) { +// Critical problem, do something ... +} } } 1.77 +2 -2 jakarta-tomcat-5/tomcat.nsi Index: tomcat.nsi === RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- tomcat.nsi28 Jul 2005 14:17:51 - 1.76 +++ tomcat.nsi29 Jul 2005 15:35:48 - 1.77 @@ -310,7 +310,7 @@ Section -post nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //US//Tomcat5 --Classpath "$INSTDIR\bin\bootstrap.jar" --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --StartMode jvm --StopMode jvm' - nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //US//Tomcat5 --JvmOptions "-Dcatalina.home=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\common\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=${catalina.base}\conf\logging.properties" --StdOutput auto --StdError auto' + nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //US//Tomcat5 --JvmOptions "-Dcatalina.home=$INSTDIR#-Dcatalina.base=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\common\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=${catalina.base}\conf\logging.properties" --StdOutput auto --StdError auto' WriteUninstaller "$INSTDIR\Uninstall.exe" - 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 AprEndpoint.java
remm2005/07/29 03:23:56 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java LocalStrings.properties AjpMessage.java http11/src/java/org/apache/coyote/http11 LocalStrings.properties Http11Processor.java Http11AprProcessor.java util/java/org/apache/tomcat/util/net AprEndpoint.java Log: - Internationalization for the processor classes. - Code cleanups. - No functional changes. Revision ChangesPath 1.14 +18 -24 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- AjpAprProcessor.java 28 Jul 2005 13:48:47 - 1.13 +++ AjpAprProcessor.java 29 Jul 2005 10:23:55 - 1.14 @@ -42,7 +42,6 @@ import org.apache.tomcat.util.http.HttpMessages; import org.apache.tomcat.util.http.MimeHeaders; import org.apache.tomcat.util.net.AprEndpoint; -import org.apache.tomcat.util.net.SSLSupport; import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadWithAttributes; @@ -67,7 +66,6 @@ protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(AjpAprProcessor.class); - /** * The string manager for this package. */ @@ -439,7 +437,7 @@ error = true; break; } catch (Throwable t) { -log.debug("Error parsing HTTP request", t); +log.debug(sm.getString("ajpprocessor.header.error"), t); // 400 - Bad Request response.setStatus(400); error = true; @@ -452,7 +450,7 @@ prepareRequest(); thrA.setParam(endpoint, request.requestURI()); } catch (Throwable t) { -log.debug("Error preparing request", t); +log.debug(sm.getString("ajpprocessor.request.prepare"), t); // 400 - Internal Server Error response.setStatus(400); error = true; @@ -467,7 +465,7 @@ } catch (InterruptedIOException e) { error = true; } catch (Throwable t) { -log.error("Error processing request", t); +log.error(sm.getString("ajpprocessor.request.process"), t); // 500 - Internal Server Error response.setStatus(500); error = true; @@ -616,11 +614,11 @@ jsseCerts = new X509Certificate[1]; jsseCerts[0] = cert; } catch(java.security.cert.CertificateException e) { -log.error("Certificate convertion failed" , e ); +log.error(sm.getString("ajpprocessor.certs.fail"), e); return; } -request.setAttribute("javax.servlet.request.X509Certificate", jsseCerts); +request.setAttribute(AprEndpoint.CERTIFICATE_KEY, jsseCerts); } else if (actionCode == ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE) { @@ -630,7 +628,7 @@ long sa = Address.get(Socket.APR_REMOTE, socket); remoteAddr = Address.getip(sa); } catch (Exception e) { -log.warn("Exception getting socket information " ,e); +log.warn(sm.getString("ajpprocessor.socket.info"), e); } } request.remoteAddr().setString(remoteAddr); @@ -643,7 +641,7 @@ long sa = Address.get(Socket.APR_LOCAL, socket); localName = Address.getnameinfo(sa, 0); } catch (Exception e) { -log.warn("Exception getting socket information " ,e); +log.warn(sm.getString("ajpprocessor.socket.info"), e); } } request.localName().setString(localName); @@ -656,7 +654,7 @@ long sa = Address.get(Socket.APR_REMOTE, socket); remoteHost = Address.getnameinfo(sa, 0); } catch (Exception e) { -log.warn("Exception getting socket information " ,e); +log.warn(sm.getString("ajpprocessor.socket.info"), e);
cvs commit: jakarta-tomcat-5 tomcat.nsi
remm2005/07/28 07:17:51 Modified:.tomcat.nsi Log: - Add missing space. Revision ChangesPath 1.76 +2 -2 jakarta-tomcat-5/tomcat.nsi Index: tomcat.nsi === RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- tomcat.nsi28 Jul 2005 14:01:49 - 1.75 +++ tomcat.nsi28 Jul 2005 14:17:51 - 1.76 @@ -162,7 +162,7 @@ InstallRetry: ClearErrors - nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName "Apache Tomcat" --Description "Apache Tomcat @VERSION@ Server - http://jakarta.apache.org/tomcat/"; --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat5.exe" --Jvm "$2"--StartPath "$INSTDIR" --StopPath "$INSTDIR"' + nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //IS//Tomcat5 --DisplayName "Apache Tomcat" --Description "Apache Tomcat @VERSION@ Server - http://jakarta.apache.org/tomcat/"; --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\tomcat5.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"' Pop $0 StrCmp $0 "0" InstallOk MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP \ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpAprProcessor.java
remm2005/07/28 06:48:47 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java Log: - Cleanup attribute parsing code (shouild be equivalent). Revision ChangesPath 1.13 +22 -27 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- AjpAprProcessor.java 28 Jul 2005 12:17:02 - 1.12 +++ AjpAprProcessor.java 28 Jul 2005 13:48:47 - 1.13 @@ -826,21 +826,13 @@ } // Decode extra attributes -boolean moreAttr = true; +byte attributeCode; +while ((attributeCode = requestHeaderMessage.getByte()) +!= Constants.SC_A_ARE_DONE) { -while (moreAttr) { -byte attributeCode = requestHeaderMessage.getByte(); -if (attributeCode == Constants.SC_A_ARE_DONE) -break; - -if (attributeCode == Constants.SC_A_SSL_KEY_SIZE) { -// Bug 1326: it's an Integer. -request.setAttribute(SSLSupport.KEY_SIZE_KEY, - new Integer(requestHeaderMessage.getInt())); -} - -if (attributeCode == Constants.SC_A_REQ_ATTRIBUTE ) { -// 2 strings ???... +switch (attributeCode) { + +case Constants.SC_A_REQ_ATTRIBUTE : requestHeaderMessage.getBytes(tmpMB); String n = tmpMB.toString(); requestHeaderMessage.getBytes(tmpMB); @@ -848,10 +840,8 @@ request.setAttribute(n, v); if (log.isTraceEnabled()) log.trace("jk Attribute set " + n + "=" + v); -} - -// 1 string attributes -switch (attributeCode) { +break; + case Constants.SC_A_CONTEXT : requestHeaderMessage.getBytes(tmpMB); // nothing @@ -890,7 +880,7 @@ case Constants.SC_A_SSL_CERT : request.scheme().setString("https"); -// SSL certificate extraction is costy, moved to JkCoyoteHandler +// SSL certificate extraction is lazy, moved to JkCoyoteHandler requestHeaderMessage.getBytes(certificates); break; @@ -908,21 +898,26 @@ tmpMB.toString()); break; +case Constants.SC_A_SSL_KEY_SIZE : +request.setAttribute(SSLSupport.KEY_SIZE_KEY, +new Integer(requestHeaderMessage.getInt())); +break; + +// FIXME: no usage for secret attribute here +/* case Constants.SC_A_SECRET : requestHeaderMessage.getBytes(tmpMB); -String secret = tmpMB.toString(); -if(log.isInfoEnabled()) -log.info("Secret: " + secret); -// FIXME: endpoint note - what's that ? -// endpoint.setNote(secretNote, secret); break; +*/ case Constants.SC_A_STORED_METHOD: requestHeaderMessage.getBytes(request.method()); break; default: -break; // ignore, we don't know about it - backward compat +// Ignore unknown attribute for backward compatibility +break; + } } @@ -1390,8 +1385,8 @@ thisTime = chunkSize; } len -= thisTime; -if (outputBuffer.position() + thisTime -+ bodyMessage.getHeaderLength() + 4 > outputBuffer.capacity()) { +if (outputBuffer.position() + thisTime + 4 + 4 > +outputBuffer.capacity()) { flush(); } outputBuffer.put((byte) 0x41); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpAprProcessor.java
remm2005/07/28 05:17:02 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java Log: - Remove bad import. Revision ChangesPath 1.12 +1 -2 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AjpAprProcessor.java 27 Jul 2005 19:29:16 - 1.11 +++ AjpAprProcessor.java 28 Jul 2005 12:17:02 - 1.12 @@ -32,7 +32,6 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; -import org.apache.jk.common.AjpConstants; import org.apache.tomcat.jni.Address; import org.apache.tomcat.jni.Sockaddr; import org.apache.tomcat.jni.Socket; @@ -1398,7 +1397,7 @@ outputBuffer.put((byte) 0x41); outputBuffer.put((byte) 0x42); outputBuffer.putShort((short) (thisTime + 4)); -outputBuffer.put(AjpConstants.JK_AJP13_SEND_BODY_CHUNK); +outputBuffer.put(Constants.JK_AJP13_SEND_BODY_CHUNK); outputBuffer.putShort((short) chunk.getLength()); outputBuffer.put(chunk.getBytes(), chunk.getOffset() + off, thisTime); outputBuffer.put((byte) 0x00); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.properties.default
remm2005/07/27 15:16:25 Modified:.build.properties.default Log: - Update default SF location (the old one doesn't seem to work that well). Revision ChangesPath 1.151 +2 -3 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.150 retrieving revision 1.151 diff -u -r1.150 -r1.151 --- build.properties.default 27 Jul 2005 11:06:20 - 1.150 +++ build.properties.default 27 Jul 2005 22:16:25 - 1.151 @@ -59,8 +59,7 @@ base-struts.loc=http://archive.apache.org/dist/struts # - Sourceforge files base location - -base-sf.loc=http://umn.dl.sourceforge.net/sourceforge -#base-sf.loc=http://switch.dl.sourceforge.net/sourceforge +base-sf.loc=http://switch.dl.sourceforge.net/sourceforge #base-sf.loc=http://heanet.dl.sourceforge.net/sourceforge #base-sf.loc=http://internap.dl.sourceforge.net/sourceforge - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/27 12:39:18 Modified:webapps/docs changelog.xml Log: - Update changelog. Revision ChangesPath 1.345 +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.344 retrieving revision 1.345 diff -u -r1.344 -r1.345 --- changelog.xml 27 Jul 2005 11:26:32 - 1.344 +++ changelog.xml 27 Jul 2005 19:39:17 - 1.345 @@ -65,6 +65,9 @@ Check filename sendfile attribute only if sendfile is enabled. (remm) + +Fix output buffering for APR AJP implementation. (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp AjpAprProcessor.java
remm2005/07/27 12:29:16 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java Log: - After flushing, it's a good idea to write the data. - I did spend most time testing uploading, as obviously it's trivial to not mess up downloading. Revision ChangesPath 1.11 +7 -8 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- AjpAprProcessor.java 26 Jul 2005 16:13:33 - 1.10 +++ AjpAprProcessor.java 27 Jul 2005 19:29:16 - 1.11 @@ -1394,15 +1394,14 @@ if (outputBuffer.position() + thisTime + bodyMessage.getHeaderLength() + 4 > outputBuffer.capacity()) { flush(); -} else { -outputBuffer.put((byte) 0x41); -outputBuffer.put((byte) 0x42); -outputBuffer.putShort((short) (thisTime + 4)); -outputBuffer.put(AjpConstants.JK_AJP13_SEND_BODY_CHUNK); -outputBuffer.putShort((short) chunk.getLength()); -outputBuffer.put(chunk.getBytes(), chunk.getOffset() + off, thisTime); -outputBuffer.put((byte) 0x00); } +outputBuffer.put((byte) 0x41); +outputBuffer.put((byte) 0x42); +outputBuffer.putShort((short) (thisTime + 4)); +outputBuffer.put(AjpConstants.JK_AJP13_SEND_BODY_CHUNK); +outputBuffer.putShort((short) chunk.getLength()); +outputBuffer.put(chunk.getBytes(), chunk.getOffset() + off, thisTime); +outputBuffer.put((byte) 0x00); off += thisTime; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/27 04:26:32 Modified:webapps/docs changelog.xml Log: - Fix version number. Revision ChangesPath 1.344 +1 -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.343 retrieving revision 1.344 diff -u -r1.343 -r1.344 --- changelog.xml 27 Jul 2005 11:06:19 - 1.343 +++ changelog.xml 27 Jul 2005 11:26:32 - 1.344 @@ -30,7 +30,7 @@ -Update to Xerces 1.7.1 (remm) +Update to Xerces 2.7.1 (remm) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.properties.default
remm2005/07/27 04:06:20 Modified:webapps/docs changelog.xml .build.properties.default Log: - Update Xerces again. Revision ChangesPath 1.343 +1 -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.342 retrieving revision 1.343 diff -u -r1.342 -r1.343 --- changelog.xml 27 Jul 2005 00:54:35 - 1.342 +++ changelog.xml 27 Jul 2005 11:06:19 - 1.343 @@ -30,7 +30,7 @@ -Update to Xerces 1.7.0 (remm) +Update to Xerces 1.7.1 (remm) 1.150 +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.149 retrieving revision 1.150 diff -u -r1.149 -r1.150 --- build.properties.default 25 Jul 2005 11:38:12 - 1.149 +++ build.properties.default 27 Jul 2005 11:06:20 - 1.150 @@ -132,12 +132,12 @@ jaas.jar=${jndi.lib}/jaas.jar -# - Xerces XML Parser, version 2.7.0 - -xerces.home=${base.path}/xerces-2_7_0 +# - Xerces XML Parser, version 2.7.1 - +xerces.home=${base.path}/xerces-2_7_1 xerces.lib=${xerces.home} xercesImpl.jar=${xerces.lib}/xercesImpl.jar xml-apis.jar=${xerces.lib}/xml-apis.jar -xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.0.tar.gz +xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.1.tar.gz # - Eclipse JDT, version 3.1.0 or later - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves SemaphoreValve.java LocalStrings.properties
remm2005/07/26 10:17:44 Modified:catalina/src/share/org/apache/catalina/valves SemaphoreValve.java LocalStrings.properties Log: - Oops, fix impl using Lifecycle. Revision ChangesPath 1.2 +109 -13 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java Index: SemaphoreValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SemaphoreValve.java 26 Jul 2005 12:45:22 - 1.1 +++ SemaphoreValve.java 26 Jul 2005 17:17:43 - 1.2 @@ -23,8 +23,13 @@ import javax.servlet.ServletException; +import org.apache.catalina.Lifecycle; +import org.apache.catalina.LifecycleException; +import org.apache.catalina.LifecycleListener; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; +import org.apache.catalina.util.LifecycleSupport; +import org.apache.catalina.util.StringManager; /** @@ -38,18 +43,8 @@ */ public class SemaphoreValve -extends ValveBase { - - -// Constructor - - -/** - * Create a new StandardHost component with the default basic Valve. - */ -public SemaphoreValve() { -semaphore = new Semaphore(concurrency, fairness); -} +extends ValveBase +implements Lifecycle { // - Instance Variables @@ -63,11 +58,30 @@ /** + * The string manager for this package. + */ +private StringManager sm = +StringManager.getManager(Constants.Package); + + +/** * Semaphore. */ protected Semaphore semaphore = null; +/** + * The lifecycle event support for this component. + */ +protected LifecycleSupport lifecycle = new LifecycleSupport(this); + + +/** + * Has this component been started yet? + */ +private boolean started = false; + + // - Properties @@ -87,6 +101,88 @@ public void setFairness(boolean fairness) { this.fairness = fairness; } +// -- Lifecycle Methods + + +/** + * Add a lifecycle event listener to this component. + * + * @param listener The listener to add + */ +public void addLifecycleListener(LifecycleListener listener) { + +lifecycle.addLifecycleListener(listener); + +} + + +/** + * Get the lifecycle listeners associated with this lifecycle. If this + * Lifecycle has no listeners registered, a zero-length array is returned. + */ +public LifecycleListener[] findLifecycleListeners() { + +return lifecycle.findLifecycleListeners(); + +} + + +/** + * Remove a lifecycle event listener from this component. + * + * @param listener The listener to add + */ +public void removeLifecycleListener(LifecycleListener listener) { + +lifecycle.removeLifecycleListener(listener); + +} + + +/** + * Prepare for the beginning of active use of the public methods of this + * component. This method should be called after configure(), + * and before any of the public methods of the component are utilized. + * + * @exception LifecycleException if this component detects a fatal error + * that prevents this component from being used + */ +public void start() throws LifecycleException { + +// Validate and update our current component state +if (started) +throw new LifecycleException +(sm.getString("semaphoreValve.alreadyStarted")); +lifecycle.fireLifecycleEvent(START_EVENT, null); +started = true; + +semaphore = new Semaphore(concurrency, fairness); + +} + + +/** + * Gracefully terminate the active use of the public methods of this + * component. This method should be the last one called on a given + * instance of this component. + * + * @exception LifecycleException if this component detects a fatal error + * that needs to be reported + */ +public void stop() throws LifecycleException { + +// Validate and update our current component state +if (!started) +throw new LifecycleException +(sm.getString("semaphoreValve.notStarted")); +lifecycle.fireLifec
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/26 09:39:14 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java webapps/docs changelog.xml Log: - Small tweak: don't check the attribute if sendfile is disabled. Revision ChangesPath 1.27 +14 -12 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- Http11AprProcessor.java 25 Jul 2005 15:32:48 - 1.26 +++ Http11AprProcessor.java 26 Jul 2005 16:39:14 - 1.27 @@ -1553,18 +1553,20 @@ } // Sendfile support -String fileName = (String) request.getAttribute("org.apache.tomcat.sendfile.filename"); -if (fileName != null) { -// No entity body sent here -outputBuffer.addActiveFilter -(outputFilters[Constants.VOID_FILTER]); -contentDelimitation = true; -sendfileData = new AprEndpoint.SendfileData(); -sendfileData.fileName = fileName; -sendfileData.start = -((Long) request.getAttribute("org.apache.tomcat.sendfile.start")).longValue(); -sendfileData.end = -((Long) request.getAttribute("org.apache.tomcat.sendfile.end")).longValue(); +if (endpoint.getUseSendfile()) { +String fileName = (String) request.getAttribute("org.apache.tomcat.sendfile.filename"); +if (fileName != null) { +// No entity body sent here +outputBuffer.addActiveFilter +(outputFilters[Constants.VOID_FILTER]); +contentDelimitation = true; +sendfileData = new AprEndpoint.SendfileData(); +sendfileData.fileName = fileName; +sendfileData.start = +((Long) request.getAttribute("org.apache.tomcat.sendfile.start")).longValue(); +sendfileData.end = +((Long) request.getAttribute("org.apache.tomcat.sendfile.end")).longValue(); +} } // Check for compression 1.340 +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.339 retrieving revision 1.340 diff -u -r1.339 -r1.340 --- changelog.xml 26 Jul 2005 16:13:33 - 1.339 +++ changelog.xml 26 Jul 2005 16:39:14 - 1.340 @@ -55,6 +55,9 @@ Add missing tomcatAuthentication attribute to the AJP APR implementation. (remm) + + Check filename sendfile attribute only if sendfile is enabled. (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/26 09:13:33 Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java AjpAprProtocol.java webapps/docs changelog.xml Log: - Add tomcatAuthentication to the protocol handler, so that it can actually be configured. - Remove all other useless attributes (which came along from the HTTP cut & paste). Revision ChangesPath 1.10 +7 -53 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Index: AjpAprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- AjpAprProcessor.java 23 Jun 2005 17:22:13 - 1.9 +++ AjpAprProcessor.java 26 Jul 2005 16:13:33 - 1.10 @@ -79,7 +79,7 @@ // --- Constructors -public AjpAprProcessor(int headerBufferSize, AprEndpoint endpoint) { +public AjpAprProcessor(AprEndpoint endpoint) { this.endpoint = endpoint; @@ -180,12 +180,6 @@ /** - * Use Tomcat authentication ? - */ -protected boolean tomcatAuthentication = true; - - -/** * Socket associated with the current connection. */ protected long socket; @@ -228,12 +222,6 @@ /** - * Max post size. - */ -protected int maxPostSize = 2 * 1024 * 1024; - - -/** * Host name (used to avoid useless B2C conversion on the host name). */ protected char[] hostNameC = new char[0]; @@ -246,12 +234,6 @@ /** - * Allow a customized the server header for the tin-foil hat folks. - */ -protected String server = null; - - -/** * The socket timeout used when reading the first block of the request * header. */ @@ -371,43 +353,15 @@ // - Properties -// - Public Methods - - -/** - * Set the maximum size of a POST which will be buffered in SSL mode. - */ -public void setMaxPostSize(int mps) { -maxPostSize = mps; -} - - -/** - * Return the maximum size of a POST which will be buffered in SSL mode. - */ -public int getMaxPostSize() { -return maxPostSize; -} - - /** - * Set the server header name. + * Use Tomcat authentication ? */ -public void setServer( String server ) { -if (server==null || server.equals("")) { -this.server = null; -} else { -this.server = server; -} -} - +protected boolean tomcatAuthentication = true; +public boolean getTomcatAuthentication() { return tomcatAuthentication; } +public void setTomcatAuthentication(boolean tomcatAuthentication) { this.tomcatAuthentication = tomcatAuthentication; } -/** - * Get the server header name. - */ -public String getServer() { -return server; -} + +// - Public Methods /** Get the request associated with this processor. 1.6 +9 -215 jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java Index: AjpAprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProtocol.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AjpAprProtocol.java 27 Jun 2005 13:44:04 - 1.5 +++ AjpAprProtocol.java 26 Jul 2005 16:13:33 - 1.6 @@ -33,7 +33,6 @@ import org.apache.coyote.RequestGroupInfo; import org.apache.coyote.RequestInfo; import org.apache.tomcat.util.net.AprEndpoint; -import org.apache.tomcat.util.net.ServerSocketFactory; import org.apache.tomcat.util.net.AprEndpoint.Handler; import org.apache.tomcat.util.res.StringManager; @@ -195,26 +194,11 @@ protected Hashtable attributes = new Hashtable(); private int timeout = 30; // 5 minutes as in Apache HTTPD server -private int maxPostSize = 2 * 1024 * 1024; -private int maxHttpHeaderSize = 4 * 1024; -private String reportedname; -private int socketCloseDelay=-1; -private boolean disableUploadTimeout = true; -private int socketBuffer = 9000; +protected boolean tomcatAuthentication = true; + private Adapter adapter; private AjpConnectionHandler cHandler; -/** - * Com
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/26 05:45:22 Modified:catalina/src/share/org/apache/catalina/valves ValveBase.java ErrorReportValve.java mbeans-descriptors.xml catalina build.xml webapps/docs changelog.xml Added: catalina/src/share/org/apache/catalina/valves SemaphoreValve.java Log: - Add a simple valve for concurrency control, with a conditional compilation flag. - At the moment, this will not be shipped in the release (needs Java 5). - Update changelog. Revision ChangesPath 1.19 +15 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ValveBase.java Index: ValveBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ValveBase.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ValveBase.java2 Mar 2005 20:19:58 - 1.18 +++ ValveBase.java26 Jul 2005 12:45:22 - 1.19 @@ -178,6 +178,20 @@ public abstract void invoke(Request request, Response response) throws IOException, ServletException; + +/** + * Return a String rendering of this object. + */ +public String toString() { +StringBuffer sb = new StringBuffer(this.getClass().getName()); +sb.append("["); +if (container != null) +sb.append(container.getName()); +sb.append("]"); +return (sb.toString()); +} + + // JMX and Registration protected String domain; protected ObjectName oname; 1.26 +1 -14 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java Index: ErrorReportValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- ErrorReportValve.java 21 Jan 2005 13:11:02 - 1.25 +++ ErrorReportValve.java 26 Jul 2005 12:45:22 - 1.26 @@ -141,19 +141,6 @@ } -/** - * Return a String rendering of this object. - */ -public String toString() { - -StringBuffer sb = new StringBuffer("ErrorReportValve["); -sb.append(container.getName()); -sb.append("]"); -return (sb.toString()); - -} - - // -- Protected Methods 1.10 +25 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/mbeans-descriptors.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mbeans-descriptors.xml19 Nov 2004 20:06:07 - 1.9 +++ mbeans-descriptors.xml26 Jul 2005 12:45:22 - 1.10 @@ -234,6 +234,31 @@ type="java.lang.String"/> + + + + + + + + + + + + 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.catalina.valves; import java.io.IOException; import java.util.concurrent.Semaphore; import javax.servlet.ServletException; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; /** * Implementation of a Valve that limits concurrency. * * This Valve may be attached to any Container, depending on the granularity * of the concurrency control you wish to perform. * * @author Remy Maucherat * @version $Revision: 1.1 $ $Date: 2005/07/26 12:45:22 $ */ public class SemaphoreValve extends ValveBase { // Constructor /** * Create a new StandardHost component with the default basic Valve. */ public SemaphoreValve() { semaphore = new Semaphore(concurrency, fairness); } // - Instance Variables /** * The descriptive information related to t
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11AprProcessor.java
remm2005/07/25 08:32:48 Modified:http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11AprProcessor.java Log: - Oops, fix bad cut & paste error (the condition is inverted), which causes problems when using the default ports. Revision ChangesPath 1.121 +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.120 retrieving revision 1.121 diff -u -r1.120 -r1.121 --- Http11Processor.java 22 May 2005 17:12:11 - 1.120 +++ Http11Processor.java 25 Jul 2005 15:32:48 - 1.121 @@ -1375,7 +1375,7 @@ if (colonPos < 0) { if (sslSupport == null) { -// 80 - Default HTTTP port +// 80 - Default HTTP port request.setServerPort(80); } else { // 443 - Default HTTPS port 1.26 +2 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- Http11AprProcessor.java 13 Jul 2005 13:03:51 - 1.25 +++ Http11AprProcessor.java 25 Jul 2005 15:32:48 - 1.26 @@ -1422,8 +1422,8 @@ } if (colonPos < 0) { -if (ssl) { -// 80 - Default HTTTP port +if (!ssl) { +// 80 - Default HTTP port request.setServerPort(80); } else { // 443 - Default HTTPS port - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.properties.default
remm2005/07/25 04:38:12 Modified:.build.properties.default Log: - Update some dependencies, in particular Xerces to 2.7.0. Revision ChangesPath 1.149 +8 -8 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.148 retrieving revision 1.149 diff -u -r1.148 -r1.149 --- build.properties.default 3 Jul 2005 16:41:23 - 1.148 +++ build.properties.default 25 Jul 2005 11:38:12 - 1.149 @@ -94,10 +94,10 @@ # - Commons Digester, version 1.4 or later - -commons-digester.home=${base.path}/commons-digester-1.6 +commons-digester.home=${base.path}/commons-digester-1.7 commons-digester.lib=${commons-digester.home} -commons-digester.jar=${commons-digester.lib}/commons-digester.jar -commons-digester.loc=${base-jakarta.loc}/commons/digester/binaries/commons-digester-1.6.tar.gz +commons-digester.jar=${commons-digester.lib}/commons-digester-1.7.jar +commons-digester.loc=${base-jakarta.loc}/commons/digester/binaries/commons-digester-1.7.tar.gz # - Commons Expression Language (EL), version 1.0 or later - @@ -132,15 +132,15 @@ jaas.jar=${jndi.lib}/jaas.jar -# - Xerces XML Parser, version 2.6.2 - -xerces.home=${base.path}/xerces-2_6_2 +# - Xerces XML Parser, version 2.7.0 - +xerces.home=${base.path}/xerces-2_7_0 xerces.lib=${xerces.home} xercesImpl.jar=${xerces.lib}/xercesImpl.jar xml-apis.jar=${xerces.lib}/xml-apis.jar -xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.6.2.tar.gz +xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.0.tar.gz -# - Eclipse JDT, version 3.0 or later - +# - Eclipse JDT, version 3.1.0 or later - jdt.home=${base.path}/eclipse/plugins jdt.lib=${jdt.home} jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.0.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5/resources/confinstall server_1.xml
remm2005/07/22 13:05:17 Modified:resources/confinstall server_1.xml Log: - Add listener to the installer server.xml. Revision ChangesPath 1.11 +1 -0 jakarta-tomcat-5/resources/confinstall/server_1.xml Index: server_1.xml === RCS file: /home/cvs/jakarta-tomcat-5/resources/confinstall/server_1.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- server_1.xml 12 Jan 2005 17:44:36 - 1.10 +++ server_1.xml 22 Jul 2005 20:05:16 - 1.11 @@ -14,6 +14,7 @@ + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/07/21 06:24:53 Modified:webapps/docs apr.xml Log: - Add sources location. Revision ChangesPath 1.7 +2 -0 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- apr.xml 13 Jul 2005 16:20:16 - 1.6 +++ apr.xml 21 Jul 2005 13:24:53 - 1.7 @@ -72,6 +72,8 @@ + The wrapper library sources are located in the Tomcat sources bundle, in the + jakarta-tomcat-connectors/jni/native. Once the build environment is installed, the wrapper library can be compiled using: ./configure && make && make install - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
remm2005/07/20 02:45:14 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java webapps/docs changelog.xml Log: - Remove useless import. - Add SSL to the changelog. Revision ChangesPath 1.68 +0 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- AprEndpoint.java 16 Jul 2005 12:22:42 - 1.67 +++ AprEndpoint.java 20 Jul 2005 09:45:14 - 1.68 @@ -16,7 +16,6 @@ package org.apache.tomcat.util.net; -import java.io.IOException; import java.net.InetAddress; import java.util.ArrayList; import java.util.HashMap; 1.322 +1 -4 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.321 retrieving revision 1.322 diff -u -r1.321 -r1.322 --- changelog.xml 3 Jul 2005 16:41:23 - 1.321 +++ changelog.xml 20 Jul 2005 09:45:14 - 1.322 @@ -147,9 +147,6 @@ 34578: Updated JNDIRealm comment. (yoavs) - -[Placeholder for HttpAprConnector] - 34273: Better Bootstrap warning message. [Path from Ralf Hauser] (yoavs) @@ -187,7 +184,7 @@ Add some Mbean attributes and operations to ChannelSocket (pero) -Apache Portable Runtime based HTTP/1.1 protocol handler (remm) +Apache Portable Runtime based HTTP/1.1 protocol handler, with SSL support (remm) Add support for simple file-based CRLs under JDK 1.5 (billbarker) - 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 AprEndpoint.java
remm2005/07/15 08:40:00 Modified:util/java/org/apache/tomcat/util/net/res LocalStrings.properties util/java/org/apache/tomcat/util/net AprEndpoint.java Log: - Some localization. Revision ChangesPath 1.11 +2 -0 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- LocalStrings.properties 14 Jun 2005 13:14:18 - 1.10 +++ LocalStrings.properties 15 Jul 2005 15:39:59 - 1.11 @@ -11,6 +11,8 @@ endpoint.debug.unlock=Caught exception trying to unlock accept on port {0} endpoint.err.close=Caught exception trying to close socket endpoint.noProcessor=No Processors - worker thread dead! +endpoint.init.bind=Socket bind failed: {0} +endpoint.init.listen=Socket listen failed: {0} endpoint.accept.fail=Socket accept failed endpoint.poll.limitedpollsize=Failed to create poller with specified size, uses 62 instead 1.65 +7 -4 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- AprEndpoint.java 14 Jul 2005 22:35:21 - 1.64 +++ AprEndpoint.java 15 Jul 2005 15:40:00 - 1.65 @@ -16,6 +16,7 @@ package org.apache.tomcat.util.net; +import java.io.IOException; import java.net.InetAddress; import java.util.ArrayList; import java.util.HashMap; @@ -512,12 +513,14 @@ Socket.APR_PROTO_TCP, rootPool); // Bind the server socket int ret = Socket.bind(serverSock, inetAddress); -if (ret != 0) - throw(new Exception("bind failed: " + ret)); +if (ret != 0) { +throw new Exception(sm.getString("endpoint.init.bind", "" + ret)); +} // Start listening on the server socket ret = Socket.listen(serverSock, backlog); -if (ret != 0) - throw(new Exception("listen failed: " + ret)); +if (ret != 0) { +throw new Exception(sm.getString("endpoint.init.listen", "" + ret)); +} // Sendfile usage on systems which don't support it cause major problems if (useSendfile && !Library.APR_HAS_SENDFILE) { - 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 AprEndpoint.java
remm2005/07/14 10:45:25 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java Log: - Cosmetic change. Set socket to 0. Revision ChangesPath 1.63 +1 -0 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- AprEndpoint.java 8 Jul 2005 15:43:23 - 1.62 +++ AprEndpoint.java 14 Jul 2005 17:45:25 - 1.63 @@ -666,6 +666,7 @@ serverSockPool = 0; // Close server socket Socket.close(serverSock); +serverSock = 0; sslContext = 0; // Close all APR memory pools and resources Pool.destroy(rootPool); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/07/13 09:20:17 Modified:webapps/docs apr.xml Log: - Add some docs. Revision ChangesPath 1.6 +25 -0 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apr.xml 10 Jul 2005 17:20:22 - 1.5 +++ apr.xml 13 Jul 2005 16:20:16 - 1.6 @@ -66,6 +66,7 @@ APR 1.1+ development headers (libapr1-dev package) OpenSSL 0.9.7+ development headers (libssl-dev package) +JNI headers from Java compatible JDK 1.4+ GNU development environment (gcc, make) @@ -166,6 +167,19 @@ The default value is off. + + + Protocol which may be used for communicating with clients. The default is "all", with + other acceptable values being "SSLv2", "SSLv3", "TLSv1", and "SSLv2+SSLv3". + + + + + Ciphers which may be used for communicating with clients. The default is "ALL", with + other acceptable values being a list of ciphers, with ":" used as the delimiter + (see OpenSSL documentation for the list of ciphers supported). + + Name of the file that contains the server certificate. The format is PEM-encoded. @@ -184,6 +198,17 @@ should prompt for the pass phrase. + + + Ask client for certificate. The default is "none", meaning the client will not have the opportunity + to submit a certificate. Other acceptable values include "optional", "require" and "optionalNoCA". + + + + + Maximum verification depth for client certificates. The default is "10". + + - 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 Http11AprProcessor.java
remm2005/07/13 06:03:51 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Code cleanups and comments. Revision ChangesPath 1.25 +18 -10 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Http11AprProcessor.java 13 Jul 2005 11:05:19 - 1.24 +++ Http11AprProcessor.java 13 Jul 2005 13:03:51 - 1.25 @@ -1080,10 +1080,13 @@ try { if (ssl) { +// Cipher suite Object sslO = SSLSocket.getInfoS(socket, SSL.SSL_INFO_CIPHER); -if (sslO != null) +if (sslO != null) { request.setAttribute ("javax.servlet.request.cipher_suite", sslO); +} +// Client certificate chain if present int certLength = SSLSocket.getInfoI(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN); X509Certificate[] certs = null; if (certLength > 0) { @@ -1096,17 +1099,22 @@ certs[i] = (X509Certificate) cf.generateCertificate(stream); } } -if (certs != null) +if (certs != null) { request.setAttribute ("javax.servlet.request.X509Certificate", certs); +} +// User key size sslO = new Integer(SSLSocket.getInfoI(socket, SSL.SSL_INFO_CIPHER_USEKEYSIZE)); -if (sslO != null) +if (sslO != null) { request.setAttribute ("javax.servlet.request.key_size", sslO); +} +// SSL session ID sslO = SSLSocket.getInfoS(socket, SSL.SSL_INFO_SESSION_ID); -if (sslO != null) +if (sslO != null) { request.setAttribute ("javax.servlet.request.ssl_session", sslO); +} } } catch (Exception e) { log.warn("Exception getting SSL attributes " ,e); @@ -1115,18 +1123,17 @@ } else if (actionCode == ActionCode.ACTION_REQ_SSL_CERTIFICATE) { if (ssl) { -/* - * Consume and buffer the request body, so that it does not - * interfere with the client's handshake messages - */ + // Consume and buffer the request body, so that it does not + // interfere with the client's handshake messages InputFilter[] inputFilters = inputBuffer.getFilters(); ((BufferedInputFilter) inputFilters[Constants.BUFFERED_FILTER]) .setLimit(maxSavePostSize); inputBuffer.addActiveFilter (inputFilters[Constants.BUFFERED_FILTER]); try { -// FIXME: Verify this is the right thing to do +// Renegociate certificates SSLSocket.renegotiate(socket); +// Client certificate chain if present int certLength = SSLSocket.getInfoI(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN); X509Certificate[] certs = null; if (certLength > 0) { @@ -1139,9 +1146,10 @@ certs[i] = (X509Certificate) cf.generateCertificate(stream); } } -if (certs != null) +if (certs != null) { request.setAttribute ("javax.servlet.request.X509Certificate", certs); +} } catch (Exception e) { log.warn("Exception getting SSL Cert", e); } - 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 Http11AprProcessor.java
remm2005/07/13 04:05:20 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Fix array length if no client certs. Revision ChangesPath 1.24 +22 -25 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Http11AprProcessor.java 12 Jul 2005 17:01:42 - 1.23 +++ Http11AprProcessor.java 13 Jul 2005 11:05:19 - 1.24 @@ -1085,22 +1085,20 @@ request.setAttribute ("javax.servlet.request.cipher_suite", sslO); int certLength = SSLSocket.getInfoI(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN); -X509Certificate[] certs = new X509Certificate[certLength]; -for (int i = 0; i < certLength; i++) { -byte[] data = SSLSocket.getInfoB(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN + i); -CertificateFactory cf = -CertificateFactory.getInstance("X.509"); -ByteArrayInputStream stream = new ByteArrayInputStream(data); -certs[i] = (X509Certificate) cf.generateCertificate(stream); -} +X509Certificate[] certs = null; if (certLength > 0) { -sslO = certs; -} else { -sslO = null; +certs = new X509Certificate[certLength]; +for (int i = 0; i < certLength; i++) { +byte[] data = SSLSocket.getInfoB(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN + i); +CertificateFactory cf = +CertificateFactory.getInstance("X.509"); +ByteArrayInputStream stream = new ByteArrayInputStream(data); +certs[i] = (X509Certificate) cf.generateCertificate(stream); +} } -if (sslO != null) +if (certs != null) request.setAttribute -("javax.servlet.request.X509Certificate", sslO); +("javax.servlet.request.X509Certificate", certs); sslO = new Integer(SSLSocket.getInfoI(socket, SSL.SSL_INFO_CIPHER_USEKEYSIZE)); if (sslO != null) request.setAttribute @@ -1130,21 +1128,20 @@ // FIXME: Verify this is the right thing to do SSLSocket.renegotiate(socket); int certLength = SSLSocket.getInfoI(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN); -X509Certificate[] certs = new X509Certificate[certLength]; -for (int i = 0; i < certLength; i++) { -byte[] data = SSLSocket.getInfoB(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN + i); -CertificateFactory cf = -CertificateFactory.getInstance("X.509"); -ByteArrayInputStream stream = new ByteArrayInputStream(data); -certs[i] = (X509Certificate) cf.generateCertificate(stream); -} -Object sslO = null; +X509Certificate[] certs = null; if (certLength > 0) { -sslO = certs; +certs = new X509Certificate[certLength]; +for (int i = 0; i < certLength; i++) { +byte[] data = SSLSocket.getInfoB(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN + i); +CertificateFactory cf = +CertificateFactory.getInstance("X.509"); +ByteArrayInputStream stream = new ByteArrayInputStream(data); +certs[i] = (X509Certificate) cf.generateCertificate(stream); +} } -if (sslO != null) +if (certs != null) request.setAttribute -("javax.servlet.request.X509Certificate", sslO); +("javax.servlet.request.X509Certificate", certs)
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java
remm2005/07/12 10:01:42 Modified:jni/java/org/apache/tomcat/jni SSLSocket.java http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Translate old SSL code to APR (untested right now). Revision ChangesPath 1.18 +1 -4 jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java Index: SSLSocket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSLSocket.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- SSLSocket.java12 Jul 2005 14:56:09 - 1.17 +++ SSLSocket.java12 Jul 2005 17:01:42 - 1.18 @@ -16,9 +16,6 @@ package org.apache.tomcat.jni; -/* Import needed classes */ -import java.nio.ByteBuffer; - /** SSL Socket * * @author Mladen Turk 1.23 +52 -31 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Http11AprProcessor.java 7 Jul 2005 22:54:13 - 1.22 +++ Http11AprProcessor.java 12 Jul 2005 17:01:42 - 1.23 @@ -16,6 +16,7 @@ package org.apache.coyote.http11; +import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InterruptedIOException; import java.net.InetAddress; @@ -24,6 +25,8 @@ import java.util.regex.PatternSyntaxException; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; import org.apache.coyote.ActionCode; import org.apache.coyote.ActionHook; @@ -41,6 +44,8 @@ import org.apache.coyote.http11.filters.VoidOutputFilter; import org.apache.coyote.http11.filters.BufferedInputFilter; import org.apache.tomcat.jni.Address; +import org.apache.tomcat.jni.SSL; +import org.apache.tomcat.jni.SSLSocket; import org.apache.tomcat.jni.Sockaddr; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.util.buf.Ascii; @@ -50,7 +55,6 @@ import org.apache.tomcat.util.http.FastHttpDateFormat; import org.apache.tomcat.util.http.MimeHeaders; import org.apache.tomcat.util.net.AprEndpoint; -import org.apache.tomcat.util.net.SSLSupport; import org.apache.tomcat.util.threads.ThreadWithAttributes; @@ -90,6 +94,8 @@ outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize); response.setOutputBuffer(outputBuffer); request.setResponse(response); + +ssl = !"off".equalsIgnoreCase(endpoint.getSSLEngine()); initializeFilters(); @@ -194,10 +200,10 @@ /** - * SSL information. + * SSL enabled ? */ -protected SSLSupport sslSupport; - +protected boolean ssl = false; + /** * Socket associated with the current connection. @@ -645,14 +651,6 @@ /** - * Set the SSL information for this HTTP connection. - */ -public void setSSLSupport(SSLSupport sslSupport) { -this.sslSupport = sslSupport; -} - - -/** * Set the flag to control upload time-outs. */ public void setDisableUploadTimeout(boolean isDisabled) { @@ -898,9 +896,6 @@ inputBuffer.recycle(); outputBuffer.recycle(); -// Recycle ssl info -sslSupport = null; - return openSocket; } @@ -1084,23 +1079,36 @@ } else if (actionCode == ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { try { -if (sslSupport != null) { -Object sslO = sslSupport.getCipherSuite(); +if (ssl) { +Object sslO = SSLSocket.getInfoS(socket, SSL.SSL_INFO_CIPHER); if (sslO != null) request.setAttribute -(SSLSupport.CIPHER_SUITE_KEY, sslO); -sslO = sslSupport.getPeerCertificateChain(false); +("javax.servlet.request.cipher_suite", sslO); +int certLength = SSLSocket.getInfoI(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN); +X509Certificate[] certs = new X509Certificate[certLength]; +for (int i = 0; i < certLength; i++) { +byte[] data = SSLSocket.getInfoB(socket, SSL.SSL_INFO_CLIENT_CERT_CHAIN + i); +
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java
remm2005/07/08 08:43:23 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java Log: - Add extra value. Revision ChangesPath 1.62 +2 -0 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- AprEndpoint.java 8 Jul 2005 14:19:04 - 1.61 +++ AprEndpoint.java 8 Jul 2005 15:43:23 - 1.62 @@ -543,6 +543,8 @@ value = SSL.SSL_PROTOCOL_SSLV3; } else if ("TLSv1".equalsIgnoreCase(SSLProtocol)) { value = SSL.SSL_PROTOCOL_TLSV1; +} else if ("SSLv2+SSLv3".equalsIgnoreCase(SSLProtocol)) { +value = SSL.SSL_PROTOCOL_SSLV2 | SSL.SSL_PROTOCOL_SSLV3; } // Create SSL Context sslContext = SSLContext.make(rootPool, value, SSL.SSL_MODE_SERVER); - 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 Http11AprProtocol.java
remm2005/07/08 07:19:04 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java Log: - Add some basic configuration for protocol and client cert. Revision ChangesPath 1.61 +31 -5 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- AprEndpoint.java 7 Jul 2005 14:26:25 - 1.60 +++ AprEndpoint.java 8 Jul 2005 14:19:04 - 1.61 @@ -343,6 +343,14 @@ /** + * SSL protocols. + */ +protected String SSLProtocol = "all"; +public String getSSLProtocol() { return SSLProtocol; } +public void setSSLProtocol(String SSLProtocol) { this.SSLProtocol = SSLProtocol; } + + +/** * SSL password (if a cert is encrypted, and no password has been provided, a callback * will ask for a password). */ @@ -418,9 +426,9 @@ /** * SSL verify client. */ -protected int SSLVerifyClient = 0; -public int getSSLVerifyClient() { return SSLVerifyClient; } -public void setSSLVerifyClient(int SSLVerifyClient) { this.SSLVerifyClient = SSLVerifyClient; } +protected String SSLVerifyClient = "none"; +public String getSSLVerifyClient() { return SSLVerifyClient; } +public void setSSLVerifyClient(String SSLVerifyClient) { this.SSLVerifyClient = SSLVerifyClient; } /** @@ -527,8 +535,17 @@ } else { SSL.initialize(SSLEngine); } +// SSL protocol +int value = SSL.SSL_PROTOCOL_ALL; +if ("SSLv2".equalsIgnoreCase(SSLProtocol)) { +value = SSL.SSL_PROTOCOL_SSLV2; +} else if ("SSLv3".equalsIgnoreCase(SSLProtocol)) { +value = SSL.SSL_PROTOCOL_SSLV3; +} else if ("TLSv1".equalsIgnoreCase(SSLProtocol)) { +value = SSL.SSL_PROTOCOL_TLSV1; +} // Create SSL Context -sslContext = SSLContext.make(rootPool, SSL.SSL_PROTOCOL_SSLV2 | SSL.SSL_PROTOCOL_SSLV3, SSL.SSL_MODE_SERVER); +sslContext = SSLContext.make(rootPool, value, SSL.SSL_MODE_SERVER); // List the ciphers that the client is permitted to negotiate SSLContext.setCipherSuite(sslContext, SSLCipherSuite); // Load Server key and certificate @@ -537,7 +554,16 @@ if (SSLCACertificateFile != null) { SSLContext.setCACertificate(sslContext, SSLCACertificateFile, null); } -SSLContext.setVerify(sslContext, SSLVerifyClient, SSLVerifyDepth); +// Client certificate verification +value = SSL.SSL_CVERIFY_NONE; +if ("optional".equalsIgnoreCase(SSLVerifyClient)) { +value = SSL.SSL_CVERIFY_OPTIONAL; +} else if ("require".equalsIgnoreCase(SSLVerifyClient)) { +value = SSL.SSL_CVERIFY_REQUIRE; +} else if ("optionalNoCA".equalsIgnoreCase(SSLVerifyClient)) { +value = SSL.SSL_CVERIFY_OPTIONAL_NO_CA; +} +SSLContext.setVerify(sslContext, value, SSLVerifyDepth); // For now, sendfile is not supported with SSL useSendfile = false; } 1.15 +9 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Index: Http11AprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Http11AprProtocol.java7 Jul 2005 22:54:13 - 1.14 +++ Http11AprProtocol.java8 Jul 2005 14:19:04 - 1.15 @@ -501,6 +501,13 @@ /** + * SSL protocol. + */ +public String getSSLProtocol() { return ep.getSSLProtocol(); } +public void setSSLProtocol(String SSLProtocol) { ep.setSSLProtocol(SSLProtocol); } + + +/** * SSL password (if a cert is encrypted, and no password has been provided, a callback * will ask for a password). */ @@ -567,8 +574,8 @@ /** * SSL verify client. */ -public int getSSLVerifyClient() { return ep.getSSLVerifyClient(); } -public void setSSLVerifyClient(int SSLVerifyClient) { ep.setSSLVer
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java Http11AprProcessor.java
remm2005/07/07 15:54:14 Modified:http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java Http11AprProcessor.java Log: - Fix if block for replay data. - The SSL code there is still a placeholder. Revision ChangesPath 1.14 +0 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Index: Http11AprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Http11AprProtocol.java7 Jul 2005 14:08:40 - 1.13 +++ Http11AprProtocol.java7 Jul 2005 22:54:13 - 1.14 @@ -187,7 +187,6 @@ protected AprEndpoint ep=new AprEndpoint(); protected boolean secure; -// socket factory attriubtes ( XXX replace with normal setters ) protected Hashtable attributes = new Hashtable(); private int maxKeepAliveRequests=100; // as in Apache HTTPD server 1.22 +36 -34 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Http11AprProcessor.java 3 Jul 2005 10:12:51 - 1.21 +++ Http11AprProcessor.java 7 Jul 2005 22:54:13 - 1.22 @@ -993,31 +993,6 @@ started = false; -} else if (actionCode == ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { - -try { -if (sslSupport != null) { -Object sslO = sslSupport.getCipherSuite(); -if (sslO != null) -request.setAttribute -(SSLSupport.CIPHER_SUITE_KEY, sslO); -sslO = sslSupport.getPeerCertificateChain(false); -if (sslO != null) -request.setAttribute -(SSLSupport.CERTIFICATE_KEY, sslO); -sslO = sslSupport.getKeySize(); -if (sslO != null) -request.setAttribute -(SSLSupport.KEY_SIZE_KEY, sslO); -sslO = sslSupport.getSessionId(); -if (sslO != null) -request.setAttribute -(SSLSupport.SESSION_ID_KEY, sslO); -} -} catch (Exception e) { -log.warn("Exception getting SSL attributes " ,e); -} - } else if (actionCode == ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE) { // Get remote host address @@ -1106,7 +1081,33 @@ } request.setLocalPort(localPort); +} else if (actionCode == ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { + +try { +if (sslSupport != null) { +Object sslO = sslSupport.getCipherSuite(); +if (sslO != null) +request.setAttribute +(SSLSupport.CIPHER_SUITE_KEY, sslO); +sslO = sslSupport.getPeerCertificateChain(false); +if (sslO != null) +request.setAttribute +(SSLSupport.CERTIFICATE_KEY, sslO); +sslO = sslSupport.getKeySize(); +if (sslO != null) +request.setAttribute +(SSLSupport.KEY_SIZE_KEY, sslO); +sslO = sslSupport.getSessionId(); +if (sslO != null) +request.setAttribute +(SSLSupport.SESSION_ID_KEY, sslO); +} +} catch (Exception e) { +log.warn("Exception getting SSL attributes " ,e); +} + } else if (actionCode == ActionCode.ACTION_REQ_SSL_CERTIFICATE) { + if( sslSupport != null) { /* * Consume and buffer the request body, so that it does not @@ -1126,16 +1127,17 @@ } catch (Exception e) { log.warn("Exception getting SSL Cert", e); } -} else if (actionCode == ActionCode.ACTION_REQ_SET_BODY_REPLAY) { -ByteChunk body = (ByteChunk) param; - -InputFilter savedBody = new SavedRequestInputFilter(body); -
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net AprEndpoint.java
remm2005/07/07 07:26:25 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java Log: - Fix init a little. Revision ChangesPath 1.60 +1 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- AprEndpoint.java 7 Jul 2005 14:08:40 - 1.59 +++ AprEndpoint.java 7 Jul 2005 14:26:25 - 1.60 @@ -534,10 +534,10 @@ // Load Server key and certificate SSLContext.setCertificate(sslContext, SSLCertificateFile, SSLCertificateKeyFile, SSLPassword, SSL.SSL_AIDX_RSA); // Support Client Certificates -SSLContext.setVerify(sslContext, SSLVerifyClient, SSLVerifyDepth); if (SSLCACertificateFile != null) { SSLContext.setCACertificate(sslContext, SSLCACertificateFile, null); } +SSLContext.setVerify(sslContext, SSLVerifyClient, SSLVerifyDepth); // For now, sendfile is not supported with SSL useSendfile = false; } - 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 Http11AprProtocol.java
remm2005/07/07 07:08:40 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java Log: - Client cert config should be an int. Revision ChangesPath 1.59 +4 -4 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- AprEndpoint.java 7 Jul 2005 13:38:38 - 1.58 +++ AprEndpoint.java 7 Jul 2005 14:08:40 - 1.59 @@ -418,9 +418,9 @@ /** * SSL verify client. */ -protected boolean SSLVerifyClient = false; -public boolean getSSLVerifyClient() { return SSLVerifyClient; } -public void setSSLVerifyClient(boolean SSLVerifyClient) { this.SSLVerifyClient = SSLVerifyClient; } +protected int SSLVerifyClient = 0; +public int getSSLVerifyClient() { return SSLVerifyClient; } +public void setSSLVerifyClient(int SSLVerifyClient) { this.SSLVerifyClient = SSLVerifyClient; } /** @@ -534,7 +534,7 @@ // Load Server key and certificate SSLContext.setCertificate(sslContext, SSLCertificateFile, SSLCertificateKeyFile, SSLPassword, SSL.SSL_AIDX_RSA); // Support Client Certificates -SSLContext.setVerify(sslContext, SSLVerifyClient ? 1 : 0, SSLVerifyDepth); +SSLContext.setVerify(sslContext, SSLVerifyClient, SSLVerifyDepth); if (SSLCACertificateFile != null) { SSLContext.setCACertificate(sslContext, SSLCACertificateFile, null); } 1.13 +2 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Index: Http11AprProtocol.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Http11AprProtocol.java7 Jul 2005 13:38:38 - 1.12 +++ Http11AprProtocol.java7 Jul 2005 14:08:40 - 1.13 @@ -568,8 +568,8 @@ /** * SSL verify client. */ -public boolean getSSLVerifyClient() { return ep.getSSLVerifyClient(); } -public void setSSLVerifyClient(boolean SSLVerifyClient) { ep.setSSLVerifyClient(SSLVerifyClient); } +public int getSSLVerifyClient() { return ep.getSSLVerifyClient(); } +public void setSSLVerifyClient(int SSLVerifyClient) { ep.setSSLVerifyClient(SSLVerifyClient); } /** - 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 Http11AprProtocol.java
remm2005/07/07 06:38:38 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProtocol.java Log: - Add basic SSL support (no cert extraction yet). - Untested. Revision ChangesPath 1.58 +160 -37 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- AprEndpoint.java 3 Jul 2005 10:12:51 - 1.57 +++ AprEndpoint.java 7 Jul 2005 13:38:38 - 1.58 @@ -31,10 +31,12 @@ import org.apache.tomcat.jni.Pool; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; +import org.apache.tomcat.jni.SSL; +import org.apache.tomcat.jni.SSLContext; +import org.apache.tomcat.jni.SSLSocket; import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadWithAttributes; - /** * APR tailored thread pool, providing the following services: * @@ -149,6 +151,12 @@ */ protected long serverSockPool = 0; + +/** + * SSL context. + */ +protected long sslContext = 0; + // - Properties @@ -205,7 +213,7 @@ * Handling of accepted sockets. */ protected Handler handler = null; -public void setHandler(Handler handler ) { this.handler=handler; } +public void setHandler(Handler handler ) { this.handler = handler; } public Handler getHandler() { return handler; } @@ -325,7 +333,104 @@ */ public int getMinSpareThreads() { return 0; } + +/** + * SSL engine. + */ +protected String SSLEngine = "off"; +public String getSSLEngine() { return SSLEngine; } +public void setSSLEngine(String SSLEngine) { this.SSLEngine = SSLEngine; } + + +/** + * SSL password (if a cert is encrypted, and no password has been provided, a callback + * will ask for a password). + */ +protected String SSLPassword = null; +public String getSSLPassword() { return SSLPassword; } +public void setSSLPassword(String SSLPassword) { this.SSLPassword = SSLPassword; } + +/** + * SSL cipher suite. + */ +protected String SSLCipherSuite = "ALL"; +public String getSSLCipherSuite() { return SSLCipherSuite; } +public void setSSLCipherSuite(String SSLCipherSuite) { this.SSLCipherSuite = SSLCipherSuite; } + + +/** + * SSL certificate file. + */ +protected String SSLCertificateFile = null; +public String getSSLCertificateFile() { return SSLCertificateFile; } +public void setSSLCertificateFile(String SSLCertificateFile) { this.SSLCertificateFile = SSLCertificateFile; } + + +/** + * SSL certificate key file. + */ +protected String SSLCertificateKeyFile = null; +public String getSSLCertificateKeyFile() { return SSLCertificateKeyFile; } +public void setSSLCertificateKeyFile(String SSLCertificateKeyFile) { this.SSLCertificateKeyFile = SSLCertificateKeyFile; } + + +/** + * SSL certificate chain file. + */ +protected String SSLCertificateChainFile = null; +public String getSSLCertificateChainFile() { return SSLCertificateChainFile; } +public void setSSLCertificateChainFile(String SSLCertificateChainFile) { this.SSLCertificateChainFile = SSLCertificateChainFile; } + + +/** + * SSL CA certificate path. + */ +protected String SSLCACertificatePath = null; +public String getSSLCACertificatePath() { return SSLCACertificatePath; } +public void setSSLCACertificatePath(String SSLCACertificatePath) { this.SSLCACertificatePath = SSLCACertificatePath; } + + +/** + * SSL CA certificate file. + */ +protected String SSLCACertificateFile = null; +public String getSSLCACertificateFile() { return SSLCACertificateFile; } +public void setSSLCACertificateFile(String SSLCACertificateFile) { this.SSLCACertificateFile = SSLCACertificateFile; } + + +/** + * SSL CA revocation path. + */ +protected String SSLCARevocationPath = null; +public String getSSLCARevocationPath() { return SSLCARevocationPath; } +public void setSSLCARevocationPath(String SSLCARevocationPath) { this.SSLCARevocationPath = SSLCARevocationPath; } + + +/** + * SSL CA revocation file. + */ +protected String SSLCARevocationFile = null;
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/07/04 11:39:09 Modified:webapps/docs apr.xml Log: - Some docs updates. Revision ChangesPath 1.4 +19 -3 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- apr.xml 4 Jul 2005 14:53:20 - 1.3 +++ apr.xml 4 Jul 2005 18:39:09 - 1.4 @@ -79,7 +79,7 @@ - + Once the libraries are properly installed and available to Java (if loading fails, the library path @@ -89,10 +89,25 @@ tweaking shouldn't be required. + +When APR is enabled, the following features are also enabled in Tomcat: + + Secure session ID generation by default on all platforms (platforms other than Linux required + random number generation using a configured entropy) + OS level statistics on memory usage and CPU usage by the Tomcat process are displayed by + the status servlet + + + + + + + - The following attributes are new in the HTTP APR connector: + The following attributes are supported in the HTTP APR connector in addition to the ones supported + in the regular HTTP connector: @@ -152,7 +167,8 @@ - The following attributes are new in the AJP APR connector: + The following attributes are supported in the AJP APR connector in addition to the ones supported + in the regular AJP connector: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs apr.xml
remm2005/07/04 07:53:20 Modified:webapps/docs apr.xml Log: - Some docs updates. Revision ChangesPath 1.3 +29 -9 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- apr.xml 3 Jul 2005 16:41:22 - 1.2 +++ apr.xml 4 Jul 2005 14:53:20 - 1.3 @@ -22,9 +22,13 @@ the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT - pipes and Unix sockets). These features will allow making Tomcat a general purpose - webserver, and go far beyond simply allowing a slightly more scalable HTTP - connector. + pipes and Unix sockets). + + + + These features allows making Tomcat a general purpose webserver, will enable much better + integration with other native web technologies, and overall make Java much more viable as + a full fledged webserver platform rather than simply a backend focused technology. @@ -34,7 +38,7 @@ APR support requires three main native components to be installed: -APR library (libapr) +APR library JNI wrappers for APR used by Tomcat (libtcnative) OpenSSL libraries @@ -44,7 +48,7 @@ Windows binaries are provided for libapr and libtcnative. Windows OpenSSL - binaries are linked from the http://www.openssl.org";>official OpenSSL website + binaries are linked from the http://www.openssl.org";>Official OpenSSL website (see related/binaries). @@ -53,8 +57,22 @@ - Most Linux distributions will ship packages for APR and OpenSSL. The JNI wrapper will then have - to be compiled. It depends on APR, OpenSSL, and the Java headers. + Most Linux distributions will ship packages for APR and OpenSSL. The JNI wrapper (libtcnative) will + then have to be compiled. It depends on APR, OpenSSL, and the Java headers. + + + + Requirements: + +APR 1.1+ development headers (libapr1-dev package) +OpenSSL 0.9.7+ development headers (libssl-dev package) +GNU development environment (gcc, make) + + + + + Once the build environment is installed, the wrapper library can be compiled using: + ./configure && make && make install @@ -67,7 +85,8 @@ Once the libraries are properly installed and available to Java (if loading fails, the library path will be displayed), the Tomcat connectors will automatically use APR. Configuration of the connectors is similar to the regular connectors, but have a few extra attributes which are used to configure -APR components. +APR components. Note that the defaults should be well tuned for most use cases, and additional +tweaking shouldn't be required. @@ -120,7 +139,8 @@ The HTTPS APR connector has the same basic attributes than the HTTP APR connector, but adds OpenSSL specific ones. For the full details on using OpenSSL, please refer to OpenSSL documentations - and the many books available for it. The SSL specific attributes for the connector are: + and the many books available for it (see the http://www.openssl.org";>Official OpenSSL + website). The SSL specific attributes for the connector are: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-5 build.properties.default
remm2005/07/03 09:41:23 Modified:webapps/docs apr.xml changelog.xml .build.properties.default Log: - Update chengelog. - Update JDT to Eclipse 3.1. Revision ChangesPath 1.2 +9 -7 jakarta-tomcat-catalina/webapps/docs/apr.xml Index: apr.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/apr.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- apr.xml 27 Jun 2005 14:15:10 - 1.1 +++ apr.xml 3 Jul 2005 16:41:22 - 1.2 @@ -14,11 +14,17 @@ + Tomcat can use the http://apr.apache.org/";>Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at - the heart of Apache HTTP Server 2.x. + the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO + functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number + generation, system status, etc), and native process handling (shared memory, NT + pipes and Unix sockets). These features will allow making Tomcat a general purpose + webserver, and go far beyond simply allowing a slightly more scalable HTTP + connector. @@ -26,15 +32,11 @@ - FIXME !!! - - - - APR support requires three main components to be installed: + APR support requires three main native components to be installed: APR library (libapr) JNI wrappers for APR used by Tomcat (libtcnative) -OpenSSL library +OpenSSL libraries 1.321 +6 -4 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.320 retrieving revision 1.321 diff -u -r1.320 -r1.321 --- changelog.xml 3 Jul 2005 00:31:53 - 1.320 +++ changelog.xml 3 Jul 2005 16:41:23 - 1.321 @@ -55,7 +55,7 @@ 34248: Update JavaMail download instructions to include JAF. (yoavs) -Update to JDT from Eclipse 3.1M6, which is now feature complete (remm) +Update to JDT from Eclipse 3.1, with support for Java 5 (remm) Refactoring, redesign and extend the cluster module @@ -173,7 +173,7 @@ Fix handling of symbolic links when the DefaultServlet is generating directory -listings. +listings. (markt) @@ -187,8 +187,7 @@ Add some Mbean attributes and operations to ChannelSocket (pero) -Add Apache Portable Runtime based HTTP/1.1 protocol handler, without SSL support, which -provides efficient worker thread usage (remm) +Apache Portable Runtime based HTTP/1.1 protocol handler (remm) Add support for simple file-based CRLs under JDK 1.5 (billbarker) @@ -208,6 +207,9 @@ Add bufferSize option to the AJP/1.3 Java connector to control output buffering. (billbarker) + +Apache Portable Runtime based AJP/1.3 protocol handler (remm) + 1.148 +2 -2 jakarta-tomcat-5/build.properties.default Index: build.properties.default === RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v retrieving revision 1.147 retrieving revision 1.148 diff -u -r1.147 -r1.148 --- build.properties.default 24 Jun 2005 17:18:36 - 1.147 +++ build.properties.default 3 Jul 2005 16:41:23 - 1.148 @@ -144,7 +144,7 @@ jdt.home=${base.path}/eclipse/plugins jdt.lib=${jdt.home} jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.0.jar -jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/S-3.1M7-200505131415/eclipse-JDT-3.1M7.zip +jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1-200506271435/eclipse-JDT-3.1.zip # -- # CORE OPTIONAL LIBRARIES - 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 Http11AprProcessor.java
remm2005/07/03 03:12:51 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Small tweaks. Revision ChangesPath 1.57 +1 -3 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- AprEndpoint.java 3 Jul 2005 00:20:27 - 1.56 +++ AprEndpoint.java 3 Jul 2005 10:12:51 - 1.57 @@ -1165,7 +1165,7 @@ } else { data.pos = data.pos + nw; if (data.pos >= data.end) { -// Entire file has been send +// Entire file has been sent Pool.destroy(data.fdpool); // Set back socket to blocking mode Socket.timeoutSet(data.socket, soTimeout * 1000); @@ -1196,8 +1196,6 @@ if (rv == Status.APR_SUCCESS) { sendfileCount--; } -// Set the socket to blocking mode again -Socket.optSet(data.socket, Socket.APR_SO_NONBLOCK, 0); sendfileData.remove(data); } 1.21 +0 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Http11AprProcessor.java 3 Jul 2005 00:20:27 - 1.20 +++ Http11AprProcessor.java 3 Jul 2005 10:12:51 - 1.21 @@ -776,7 +776,6 @@ // This means that no data is available right now // (long keepalive), so that the processor should be recycled // and the method should return true -rp.setStage(org.apache.coyote.Constants.STAGE_ENDED); openSocket = true; // Add the socket to the poller endpoint.getPoller().add(socket); - 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 Http11AprProcessor.java
remm2005/07/02 17:20:27 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - Hopefully fix the algorithm. The return value is according to the comments. - Open socket will be set to true if either the socket was already closed in sendfile or if it went to the sendfile poller. Revision ChangesPath 1.56 +3 -4 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- AprEndpoint.java 2 Jul 2005 17:36:34 - 1.55 +++ AprEndpoint.java 3 Jul 2005 00:20:27 - 1.56 @@ -1155,9 +1155,8 @@ data.pos, data.end, 0); if (nw < 0) { if (!(-nw == Status.EAGAIN)) { - /* The socket will be destroyed on the - * return from the processSocket call - */ +Socket.destroy(data.socket); +data.socket = 0; return false; } else { // Break the loop and add the socket to poller. @@ -1184,7 +1183,7 @@ addS.add(data); addS.notify(); } -return true; +return false; } /** 1.20 +1 -4 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Http11AprProcessor.java 2 Jul 2005 17:36:35 - 1.19 +++ Http11AprProcessor.java 3 Jul 2005 00:20:27 - 1.20 @@ -886,12 +886,9 @@ sendfileData.socket = socket; sendfileData.keepAlive = keepAlive; if (!endpoint.getSendfile().add(sendfileData)) { -keepAlive = false; -openSocket = false; -} else { openSocket = true; +break; } -break; } } - 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 Http11AprProcessor.java
remm2005/07/02 10:36:35 Modified:util/java/org/apache/tomcat/util/net AprEndpoint.java http11/src/java/org/apache/coyote/http11 Http11AprProcessor.java Log: - No change. Remove some tabs. Revision ChangesPath 1.55 +10 -11 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java Index: AprEndpoint.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/AprEndpoint.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- AprEndpoint.java 2 Jul 2005 17:18:46 - 1.54 +++ AprEndpoint.java 2 Jul 2005 17:36:34 - 1.55 @@ -1283,17 +1283,16 @@ if (state.pos >= state.end) { remove(state); if (state.keepAlive) { - // Destroy file descriptor pool, which should close the file - Pool.destroy(state.fdpool); - Socket.timeoutSet(state.socket, soTimeout * 1000); - // If all done hand this socket off to a worker for - // processing of further requests - getWorkerThread().assign(state.socket); -} -else { - // Close the socket since this is - // the end of not keep-alive request. - Socket.destroy(state.socket); +// Destroy file descriptor pool, which should close the file +Pool.destroy(state.fdpool); +Socket.timeoutSet(state.socket, soTimeout * 1000); +// If all done hand this socket off to a worker for +// processing of further requests +getWorkerThread().assign(state.socket); +} else { +// Close the socket since this is +// the end of not keep-alive request. +Socket.destroy(state.socket); } } } 1.19 +3 -4 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Index: Http11AprProcessor.java === RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Http11AprProcessor.java 2 Jul 2005 17:18:46 - 1.18 +++ Http11AprProcessor.java 2 Jul 2005 17:36:35 - 1.19 @@ -884,13 +884,12 @@ // Do sendfile as needed: add socket to sendfile and end if (sendfileData != null) { sendfileData.socket = socket; - sendfileData.keepAlive = keepAlive; +sendfileData.keepAlive = keepAlive; if (!endpoint.getSendfile().add(sendfileData)) { keepAlive = false; openSocket = false; -} -else { - openSocket = true; +} else { +openSocket = true; } break; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]