svn commit: r1716580 - /tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html
Author: kkolinko Date: Thu Nov 26 08:37:37 2015 New Revision: 1716580 URL: http://svn.apache.org/viewvc?rev=1716580&view=rev Log: svn:eol-style=native Modified: tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html (props changed) Propchange: tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716581 - in /tomcat/site/trunk/docs: tomcat-8.0-doc/changelog.html tomcat-9.0-doc/changelog.html
Author: kkolinko Date: Thu Nov 26 08:39:13 2015 New Revision: 1716581 URL: http://svn.apache.org/viewvc?rev=1716581&view=rev Log: Update published changelog for Tomcat 8 and 9 with later typo fixes / amendments Modified: tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html tomcat/site/trunk/docs/tomcat-9.0-doc/changelog.html Modified: tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html?rev=1716581&r1=1716580&r2=1716581&view=diff == --- tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html (original) +++ tomcat/site/trunk/docs/tomcat-8.0-doc/changelog.html Thu Nov 26 08:39:13 2015 @@ -14,7 +14,7 @@ Extend the fix for http://bz.apache.org/bugzilla/show_bug.cgi?id=57136";>57136 to provide a JSP Servlet -initialisation parameter per web application that controls whether o +initialisation parameter per web application that controls whether or not EL in JSP attributes is processed as if it uses JSP attribute quoting. By default, EL does not use JSP attribute quoting. (markt) @@ -169,8 +169,8 @@ Synchronize OpenSSL to JSSE cipher mapping to recent OpenSSL changes. In -particular, TLSv1.0 is no an alias for those ciphers that -require TLSv1 and will no work with SDSLv3. TLSv1 remains +particular, TLSv1.0 is now an alias for those ciphers that +require TLSv1 and will not work with SSLv3. TLSv1 remains an alias for SSLv3. (markt) @@ -450,7 +450,7 @@ asynchronous processing. (markt) -http://bz.apache.org/bugzilla/show_bug.cgi?id=58379";>58379: Fix a rare data race on the interal reference Tomcat +http://bz.apache.org/bugzilla/show_bug.cgi?id=58379";>58379: Fix a rare data race on the internal reference Tomcat retains to the socket when switching to asynchronous processing. (markt) Modified: tomcat/site/trunk/docs/tomcat-9.0-doc/changelog.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/tomcat-9.0-doc/changelog.html?rev=1716581&r1=1716580&r2=1716581&view=diff == --- tomcat/site/trunk/docs/tomcat-9.0-doc/changelog.html (original) +++ tomcat/site/trunk/docs/tomcat-9.0-doc/changelog.html Thu Nov 26 08:39:13 2015 @@ -67,6 +67,9 @@ The 1.2.x branch includes ALPN and SNI support which are required for HTTP/2. (markt) + +Add support for HTTP/2 including server push. (markt) + Tribes - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-tc8.0.x-test-nio2 (in module tomcat-8.0.x) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-tc8.0.x-test-nio2 has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-tc8.0.x-test-nio2 : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-8.0.x/output/logs-NIO2 -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO2/logs -WARNING- No directory [/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO2/logs] The following work was performed: http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2.html Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2 (Type: Build) Work ended in a state of : Failed Elapsed: 41 mins 41 secs Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar -Dtest.reports=output/logs-NIO2 -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151126-native-src.tar.gz -Dexamples.sources.skip=true -Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151126.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151126-native-src.tar.gz -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true -Dexecute.test.nio=false -Dtest.openssl.path=/srv/gump/public/workspace/openssl-1.0.2/dest-20151126/bin /openssl -Dexecute.test.bio=false -Dexecute.test.apr=false -Dtest.excludePerformance=true -Dexecute.test.nio2=true -Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-8.0.x] CLASSPATH: /usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja r:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomca
[Bug 58655] New: IllegalStateException: calling HttpServletResponse#sendRedirect() with RemoteIpFilter
https://bz.apache.org/bugzilla/show_bug.cgi?id=58655 Bug ID: 58655 Summary: IllegalStateException: calling HttpServletResponse#sendRedirect() with RemoteIpFilter Product: Tomcat 8 Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: cristikl...@gmail.com Created attachment 33299 --> https://bz.apache.org/bugzilla/attachment.cgi?id=33299&action=edit stacktrace of error When calling `HttpServletResponse#sendRedirect()`, if `RemoteIpFilter` is in use, an `IllegalStateException` is thrown (see attached stack-trace). The error steams from the way `RemoteIpFilter.XForwardedResponse` tries to rewrite the 'Location' header. According to the servlet API, a response is considered committed after calling `sendRequest()` and it is illegal to call either `reset()` or another `sendRequest()` thereafter. WORKAROUND: Comment the code after `super.sendRedirect(location);`. However, this effectively disables the `RemoteIpFilter` on the response path and makes the server return an URL with incorrect scheme. [1] https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/filters/RemoteIpFilter.java#L679 [2] https://tomcat.apache.org/tomcat-8.0-doc/servletapi/index.html -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58655] IllegalStateException: calling HttpServletResponse#sendRedirect() with RemoteIpFilter
https://bz.apache.org/bugzilla/show_bug.cgi?id=58655 --- Comment #1 from Cristian Klein --- Forgot to mention, this bug is not triggered with Eclipse's servlet engine (I think Jetty), but only occurs when the servlet is deployed on Tomcat. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 57136] EL Parser escaping dollar sign not ${ or ${...}
https://bz.apache.org/bugzilla/show_bug.cgi?id=57136 --- Comment #32 from Konstantin Kolinko --- (In reply to Mark Thomas from comment #25) > Also see this thread on the dev list: > http://tomcat.markmail.org/thread/uzo65gf572s636ly > ("On escaping of EL in attributes (BZ 57136)" thread on dev@) As result of the above, 1. The quoteAttributeEL option has been backported to Tomcat 7 as well 2. Its default value was changed to be "true", restoring old behaviour. This will be in Tomcat 7.0.66, 8.0.30, 9.0.0.M2 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716640 - /tomcat/trunk/java/org/apache/catalina/session/FileStore.java
Author: markt Date: Thu Nov 26 13:30:23 2015 New Revision: 1716640 URL: http://svn.apache.org/viewvc?rev=1716640&view=rev Log: Fix potential NPE reported by FindBugs Modified: tomcat/trunk/java/org/apache/catalina/session/FileStore.java Modified: tomcat/trunk/java/org/apache/catalina/session/FileStore.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/FileStore.java?rev=1716640&r1=1716639&r2=1716640&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/FileStore.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/FileStore.java Thu Nov 26 13:30:23 2015 @@ -149,12 +149,14 @@ public final class FileStore extends Sto // Figure out which files are sessions int keycount = 0; -for (int i = 0; i < files.length; i++) { -if (files[i].endsWith(FILE_EXT)) { -keycount++; +if (files != null) { +for (int i = 0; i < files.length; i++) { +if (files[i].endsWith(FILE_EXT)) { +keycount++; +} } } -return (keycount); +return keycount; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716644 - /tomcat/trunk/res/findbugs/filter-false-positives.xml
Author: markt Date: Thu Nov 26 13:35:27 2015 New Revision: 1716644 URL: http://svn.apache.org/viewvc?rev=1716644&view=rev Log: Filter out a false positive Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml Modified: tomcat/trunk/res/findbugs/filter-false-positives.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/findbugs/filter-false-positives.xml?rev=1716644&r1=1716643&r2=1716644&view=diff == --- tomcat/trunk/res/findbugs/filter-false-positives.xml (original) +++ tomcat/trunk/res/findbugs/filter-false-positives.xml Thu Nov 26 13:35:27 2015 @@ -111,6 +111,12 @@ + + + + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716645 - /tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
Author: markt Date: Thu Nov 26 13:36:16 2015 New Revision: 1716645 URL: http://svn.apache.org/viewvc?rev=1716645&view=rev Log: Remove a completed TODO Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1716645&r1=1716644&r2=1716645&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Thu Nov 26 13:36:16 2015 @@ -72,8 +72,6 @@ import org.apache.tomcat.util.res.String * a TLS enabled Connector element in server.xml to enable HTTP/2 support. * * - * - * TODO: Review cookie parsing */ public class Http2UpgradeHandler extends AbstractStream implements InternalHttpUpgradeHandler, Input, Output { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716653 - /tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java
Author: markt Date: Thu Nov 26 13:47:29 2015 New Revision: 1716653 URL: http://svn.apache.org/viewvc?rev=1716653&view=rev Log: Remove completed TODO. This is handled in the Protocol implementation. Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java?rev=1716653&r1=1716652&r2=1716653&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java Thu Nov 26 13:47:29 2015 @@ -56,10 +56,6 @@ public abstract class AbstractProcessorL state = dispatch(status); } else if (state == SocketState.ASYNC_END) { state = dispatch(status); -// TODO: In case this request takes a long time to process -// remove the TBD (socket/processor/something else) from -// the waiting requests now else the async timeout will -// fire if (state == SocketState.OPEN) { // There may be pipe-lined data to read. If the data // isn't processed now, execution will exit this - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716654 - in /tomcat/trunk/java/org/apache/coyote: LocalStrings.properties Response.java
Author: markt Date: Thu Nov 26 13:51:42 2015 New Revision: 1716654 URL: http://svn.apache.org/viewvc?rev=1716654&view=rev Log: Fix an i18n TODO Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/Response.java Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1716654&r1=1716653&r2=1716654&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Thu Nov 26 13:51:42 2015 @@ -46,5 +46,6 @@ request.nullReadListener=The listener pa request.readListenerSet=The non-blocking read listener has already been set response.notAsync=It is only valid to switch to non-blocking IO within async processing or HTTP upgrade processing +response.notNonBlocking=It is invalid to call isReady() when the response has not been put into non-blocking mode response.nullWriteListener=The listener passed to setWriteListener() may not be null response.writeListenerSet=The non-blocking write listener has already been set Modified: tomcat/trunk/java/org/apache/coyote/Response.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1716654&r1=1716653&r2=1716654&view=diff == --- tomcat/trunk/java/org/apache/coyote/Response.java (original) +++ tomcat/trunk/java/org/apache/coyote/Response.java Thu Nov 26 13:51:42 2015 @@ -626,8 +626,7 @@ public final class Response { public boolean isReady() { if (listener == null) { -// TODO i18n -throw new IllegalStateException("not in non blocking mode."); +throw new IllegalStateException(sm.getString("response.notNonBlocking")); } // Assume write is not possible boolean ready = false; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716655 - /tomcat/trunk/java/org/apache/coyote/RequestInfo.java
Author: markt Date: Thu Nov 26 13:56:03 2015 New Revision: 1716655 URL: http://svn.apache.org/viewvc?rev=1716655&view=rev Log: This TODO dates back to Tomcat 4.1.x. Remove it since clearly non-one feels the need to implement this. Modified: tomcat/trunk/java/org/apache/coyote/RequestInfo.java Modified: tomcat/trunk/java/org/apache/coyote/RequestInfo.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/RequestInfo.java?rev=1716655&r1=1716654&r2=1716655&view=diff == --- tomcat/trunk/java/org/apache/coyote/RequestInfo.java (original) +++ tomcat/trunk/java/org/apache/coyote/RequestInfo.java Thu Nov 26 13:56:03 2015 @@ -30,8 +30,6 @@ import javax.management.ObjectName; * having to deal with synchronization ( since each thread will have it's own * RequestProcessorMX ). * - * TODO: Request notifications will be registered here. - * * @author Costin Manolache */ public class RequestInfo { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716656 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProtocol.java LocalStrings.properties
Author: markt Date: Thu Nov 26 14:01:40 2015 New Revision: 1716656 URL: http://svn.apache.org/viewvc?rev=1716656&view=rev Log: Implement a TODO. Trigger an exception if an HTTP upgrade is attempted over AJP. Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1716656&r1=1716655&r2=1716656&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Thu Nov 26 14:01:40 2015 @@ -16,6 +16,7 @@ */ package org.apache.coyote.ajp; +import java.io.IOException; import java.nio.ByteBuffer; import org.apache.coyote.AbstractProtocol; @@ -171,8 +172,8 @@ public abstract class AbstractAjpProtoco @Override protected Processor createUpgradeProcessor(SocketWrapperBase socket, -ByteBuffer leftoverInput, UpgradeToken upgradeToken) { -// TODO should fail - throw IOE -return null; +ByteBuffer leftoverInput, UpgradeToken upgradeToken) throws IOException { +throw new IOException(sm.getString("ajpprotocol.noUpgradeHandler", +upgradeToken.getHttpUpgradeHandler().getClass().getName())); } } Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1716656&r1=1716655&r2=1716656&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Thu Nov 26 14:01:40 2015 @@ -14,6 +14,7 @@ # limitations under the License. ajpprotocol.noSSL=SSL is not supported with AJP. The SSL host configuration for [{0}] was ignored ajpprotocol.noUpgrade=Upgrade is not supported with AJP. The UpgradeProtocol configuration for [{0}] was ignored +ajpprotocol.noUpgradeHandler=Upgrade is not supported with AJP. The HttpUpgradeHandler [{0}] can not be processed ajpnioprotocol.releaseStart=Iterating through our connections to release a socket channel [{0}] ajpnioprotocol.releaseEnd=Done iterating through our connections to release a socket channel [{0}] released [{1}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716691 - in /tomcat/trunk/java/org/apache/tomcat/util/net/openssl: OpenSSLContext.java OpenSSLUtil.java
Author: remm Date: Thu Nov 26 14:33:44 2015 New Revision: 1716691 URL: http://svn.apache.org/viewvc?rev=1716691&view=rev Log: - Since it should be the same thing, use the JSSE code to load the keystore and truststore, if using the JSSE style configuration. Then proceed to get the certificate and use setCertificateRaw as before. - If I missed something, let me know. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java?rev=1716691&r1=1716690&r2=1716691&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java Thu Nov 26 14:33:44 2015 @@ -16,36 +16,19 @@ */ package org.apache.tomcat.util.net.openssl; -import java.io.IOException; -import java.io.InputStream; import java.nio.charset.StandardCharsets; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.SecureRandom; -import java.security.UnrecoverableKeyException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.PKCS8EncodedKeySpec; import java.util.ArrayList; import java.util.Base64; import java.util.List; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; -import javax.crypto.Cipher; -import javax.crypto.EncryptedPrivateKeyInfo; -import javax.crypto.NoSuchPaddingException; -import javax.crypto.SecretKey; -import javax.crypto.SecretKeyFactory; -import javax.crypto.spec.PBEKeySpec; import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLException; import javax.net.ssl.SSLParameters; @@ -61,11 +44,11 @@ import org.apache.tomcat.jni.Certificate import org.apache.tomcat.jni.Pool; import org.apache.tomcat.jni.SSL; import org.apache.tomcat.jni.SSLContext; -import org.apache.tomcat.util.file.ConfigFileLoader; import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.Constants; import org.apache.tomcat.util.net.SSLHostConfig; import org.apache.tomcat.util.net.SSLHostConfigCertificate; +import org.apache.tomcat.util.net.jsse.JSSEKeyManager; import org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser; import org.apache.tomcat.util.res.StringManager; @@ -326,16 +309,14 @@ public class OpenSSLContext implements o SSLContext.setCipherSuite(ctx, ciphers); // Load Server key and certificate if (certificate.getCertificateFile() != null) { - +// Set certificate SSLContext.setCertificate(ctx, SSLHostConfig.adjustRelativePath(certificate.getCertificateFile()), SSLHostConfig.adjustRelativePath(certificate.getCertificateKeyFile()), certificate.getCertificateKeyPassword(), SSL.SSL_AIDX_RSA); - // Set certificate chain file SSLContext.setCertificateChainFile(ctx, SSLHostConfig.adjustRelativePath(certificate.getCertificateChainFile()), false); - // Support Client Certificates SSLContext.setCACertificate(ctx, SSLHostConfig.adjustRelativePath(sslHostConfig.getCaCertificateFile()), @@ -347,16 +328,14 @@ public class OpenSSLContext implements o SSLHostConfig.adjustRelativePath( sslHostConfig.getCertificateRevocationListPath())); } else { -/* Try use keystore */ -X509KeyManager keyManager = getJSSEKeyManager(sslHostConfig); -String alias = getJSSEAlias(sslHostConfig, keyManager); +X509KeyManager keyManager = chooseKeyManager(kms); +String alias = certificate.getCertificateKeyAlias(); X509Certificate certificate = keyManager.getCertificateChain(alias)[0]; PrivateKey key = keyManager.getPrivateKey(alias); StringBuilder sb = new StringBuilder(BEGIN_KEY); sb.append(Base64.getMimeEncoder(64, new byte[] {'\n'}).encodeToString(key.getEncoded())); sb.append(END_KEY); SSLContext.setCertificateRaw(ctx, cert
svn commit: r1716696 - /tomcat/trunk/java/org/apache/coyote/http2/Stream.java
Author: markt Date: Thu Nov 26 14:36:13 2015 New Revision: 1716696 URL: http://svn.apache.org/viewvc?rev=1716696&view=rev Log: Include the query string when pushing requests to the client Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Stream.java?rev=1716696&r1=1716695&r2=1716696&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Thu Nov 26 14:36:13 2015 @@ -386,8 +386,12 @@ public class Stream extends AbstractStre // Set the special HTTP/2 headers request.getMimeHeaders().addValue(":method").duplicate(request.method()); request.getMimeHeaders().addValue(":scheme").duplicate(request.scheme()); -// TODO: Query string - request.getMimeHeaders().addValue(":path").duplicate(request.decodedURI()); +StringBuilder path = new StringBuilder(request.requestURI().toString()); +if (!request.queryString().isNull()) { +path.append('?'); +path.append(request.queryString().toString()); +} +request.getMimeHeaders().addValue(":path").setString(path.toString()); // Authority needs to include the port only if a non-standard port is // being used. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58657] New: Spring DefferredResult errorResult response not returned in async servlet 3.1 mode
https://bz.apache.org/bugzilla/show_bug.cgi?id=58657 Bug ID: 58657 Summary: Spring DefferredResult errorResult response not returned in async servlet 3.1 mode Product: Tomcat 8 Version: 8.0.28 Hardware: Macintosh OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: Util Assignee: dev@tomcat.apache.org Reporter: jonathan.kee...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58657] Spring DefferredResult errorResult response not returned in async servlet 3.1 mode
https://bz.apache.org/bugzilla/show_bug.cgi?id=58657 --- Comment #1 from Jonathan --- Created attachment 33301 --> https://bz.apache.org/bugzilla/attachment.cgi?id=33301&action=edit Main class of demo Spring boot java class showing demonstration of error -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58657] Spring DefferredResult errorResult response not returned in async servlet 3.1 mode
https://bz.apache.org/bugzilla/show_bug.cgi?id=58657 --- Comment #2 from Jonathan --- Created attachment 33302 --> https://bz.apache.org/bugzilla/attachment.cgi?id=33302&action=edit Application config file for demo App config file for Spring boot demo -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1716656 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProtocol.java LocalStrings.properties
2015-11-26 17:01 GMT+03:00 : > Author: markt > Date: Thu Nov 26 14:01:40 2015 > New Revision: 1716656 > > URL: http://svn.apache.org/viewvc?rev=1716656&view=rev > Log: > Implement a TODO. Trigger an exception if an HTTP upgrade is attempted over > AJP. > > Modified: > tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java > tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties > > Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1716656&r1=1716655&r2=1716656&view=diff > == > --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java > (original) > +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Thu Nov > 26 14:01:40 2015 > @@ -16,6 +16,7 @@ > */ > package org.apache.coyote.ajp; > > +import java.io.IOException; > import java.nio.ByteBuffer; > > import org.apache.coyote.AbstractProtocol; > @@ -171,8 +172,8 @@ public abstract class AbstractAjpProtoco > > @Override > protected Processor createUpgradeProcessor(SocketWrapperBase socket, > -ByteBuffer leftoverInput, UpgradeToken upgradeToken) { > -// TODO should fail - throw IOE > -return null; > +ByteBuffer leftoverInput, UpgradeToken upgradeToken) throws > IOException { > +throw new IOException(sm.getString("ajpprotocol.noUpgradeHandler", > +upgradeToken.getHttpUpgradeHandler().getClass().getName())); > } > } > > Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1716656&r1=1716655&r2=1716656&view=diff > == > --- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original) > +++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Thu Nov > 26 14:01:40 2015 > @@ -14,6 +14,7 @@ > # limitations under the License. > ajpprotocol.noSSL=SSL is not supported with AJP. The SSL host configuration > for [{0}] was ignored > ajpprotocol.noUpgrade=Upgrade is not supported with AJP. The UpgradeProtocol > configuration for [{0}] was ignored > +ajpprotocol.noUpgradeHandler=Upgrade is not supported with AJP. The > HttpUpgradeHandler [{0}] can not be processed Is this message just logged, or it is visible by an end user? I guess that it happens at early stages of processing, so a user receives an empty response page + some HTTP status code. I guess that it is not logged, as it can be triggered by end user and such messages usually are not logged by default (and in rare cases are logged with UserDataHelper's help). If such a message is visible by an end user, I have concern with it mentioning the protocol name (AJP): 1) It is confusing. An average user does not know what "AJP" is. 2) A user should not know what protocol is used by a proxy. I think maybe s/AJP/this protocol/. The actual protocol should be clear from stacktrace or thread name. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58657] Spring DefferredResult errorResult response not returned in async servlet 3.1 mode
https://bz.apache.org/bugzilla/show_bug.cgi?id=58657 --- Comment #3 from Jonathan --- I have attached two classes as part of a spring boot demo to show an issue we are running into. (Would have attached whole war but for file size limit, please contact if you would like it.) With a simple Spring MVC controller using Springs DeferredResult object and Servlet 3.1 asynchronous requests, there is an issue whereby if an error occurs in the onDataAvailable() method and the onError() method is called, the error response is never returned to the user. With Jetty the exact same code returns the error response message and a HTTP status code. I have tried to look through both the Jetty code and Tomcat code to see where the difference may lie and unfortunately it is unclear to me. The actual dispatching of the async request seems to happen similarly in both containers in that the Async state is set to DISPATCHING etc. but when the responses are returned to the WebAsyncManager that Spring is using to setConcurrentResultAndDispatch() that the problem appears to occur. I tried to follow the code path but once the tomcat demo goes into NioEndPoint.class, its here that the response is completely severed. This issue does not occur if returning normal responses from a Spring Controller, only when using DeferredResults. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58658] New: 7.0.66 running with Java 6 fails unless unneeded "tomcat7-websocket.jar" is removed from lib/
https://bz.apache.org/bugzilla/show_bug.cgi?id=58658 Bug ID: 58658 Summary: 7.0.66 running with Java 6 fails unless unneeded "tomcat7-websocket.jar" is removed from lib/ Product: Tomcat 7 Version: trunk Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: knst.koli...@gmail.com Running 7.0.66 release candidate (smoke-testing) I see an issue that I think is caused by r1715984 change in build.xml: - source="${compile.source}" - target="${compile.target}" + source="1.7" + target="1.7" To reproduce: 1. Unpack apache-tomcat-7.0.66.zip 2. Set JAVA_HOME = Java 6 3. Start Tomcat 4. Deployment of every web application fails, including the ROOT one. INFO: Deploying web application directory REDACTED\apache-tomcat-7.0.66\webapps\ROOT 26.11.2015 18:54:53 org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1975) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.UnsupportedClassVersionError: org/apache/tomcat/websocket/server/WsSci : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1842) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:192) at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:157) at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1577) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1281) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more ]]] Solution - The workaround is to remove the following two files from lib directory: tomcat7-websocket.jar websocket-api.jar I guess that removing tomcat7-websocket.jar alone is enough, but I only tested with removing both of them. It is known that websocket API (JSR356) requires Java 7, so there is no use for those jar files when running with Java 6. Good news: 1. The examples web app runs successfully without those files. (I feared that it won't start). 2. JSR356 examples successfully show their HTML pages. Attempting to open a websocket connection fails immediately, as expected. Thoughts - 1. Starting Tomcat 7.0.65 with Java 6 logs a nice warning: 2
[Bug 58657] Spring DeferredResult errorResult response not returned in async servlet 3.1 mode
https://bz.apache.org/bugzilla/show_bug.cgi?id=58657 Jonathan changed: What|Removed |Added Summary|Spring DefferredResult |Spring DeferredResult |errorResult response not|errorResult response not |returned in async servlet |returned in async servlet |3.1 mode|3.1 mode -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716735 - /tomcat/trunk/webapps/docs/changelog.xml
Author: remm Date: Thu Nov 26 16:30:55 2015 New Revision: 1716735 URL: http://svn.apache.org/viewvc?rev=1716735&view=rev Log: Changelog for the keystore and truststore configuration change for OpenSSL. Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1716735&r1=1716734&r2=1716735&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Nov 26 16:30:55 2015 @@ -107,6 +107,10 @@ Improve upgrade context classloader handling by using Context.bind and unbind. (remm) + +Improve OpenSSL keystore/truststore configuration by using the code +from the JSSE implementation. (remm, jfclere) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716745 - in /tomcat/trunk/webapps/docs: config/http.xml ssl-howto.xml
Author: remm Date: Thu Nov 26 17:17:03 2015 New Revision: 1716745 URL: http://svn.apache.org/viewvc?rev=1716745&view=rev Log: Add some docs fixes for the OpenSSL configuration in NIOx, now that JSSE style is supposed to be supported. Probably not the last improvement since it is rather difficult to explain (IMO). Modified: tomcat/trunk/webapps/docs/config/http.xml tomcat/trunk/webapps/docs/ssl-howto.xml Modified: tomcat/trunk/webapps/docs/config/http.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1716745&r1=1716744&r2=1716745&view=diff == --- tomcat/trunk/webapps/docs/config/http.xml (original) +++ tomcat/trunk/webapps/docs/config/http.xml Thu Nov 26 17:17:03 2015 @@ -1382,9 +1382,11 @@ Tomcat also bundles a special SSL implementation for JSSE that is backed by OpenSSL. To enable it, the native library should be enabled as if intending to use the APR connector, the value of this attribute should be - org.apache.tomcat.util.net.openssl.OpenSSLImplementation, - and the SSL attributes configuration used should be the one from the APR - connector. + org.apache.tomcat.util.net.openssl.OpenSSLImplementation. + In that case, the attributes from either from either JSSE and OpenSSL + configuration styles can be used, as long as the two types are not mixed + (for example, it is not allowed to define use of a Java keystore and + specify a separate pem private key using the OpenSSL attribute). Modified: tomcat/trunk/webapps/docs/ssl-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/ssl-howto.xml?rev=1716745&r1=1716744&r2=1716745&view=diff == --- tomcat/trunk/webapps/docs/ssl-howto.xml (original) +++ tomcat/trunk/webapps/docs/ssl-howto.xml Thu Nov 26 17:17:03 2015 @@ -303,8 +303,9 @@ loaded or not, use one of the following: Tomcat also provides a SSL engine that directly uses OpenSSL. If the APR library is installed (as for using the APR connector), using the sslImplementationName attribute -allows enabling it. In that case, the configuration must not use the JSSE attributes, but -all the attributes that are defined for the APR connector. +allows enabling it. In that case, the configuration can use either the JSSE attributes or +the OpenSSL attributes (as used for the APR connector), but must not mix attributes from +both types in the same SSLHostConfig or Connector element.
svn commit: r1716763 - in /tomcat/trunk: java/org/apache/tomcat/websocket/ java/org/apache/tomcat/websocket/server/ test/org/apache/catalina/connector/ test/org/apache/catalina/tribes/demos/
Author: markt Date: Thu Nov 26 20:30:46 2015 New Revision: 1716763 URL: http://svn.apache.org/viewvc?rev=1716763&view=rev Log: Fix various TODOs Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteOutputStream.java tomcat/trunk/test/org/apache/catalina/tribes/demos/EchoRpcTest.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1716763&r1=1716762&r2=1716763&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Thu Nov 26 20:30:46 2015 @@ -403,8 +403,9 @@ public class AsyncChannelWrapperSecure i handshaking = false; break; } -default: { -throw new SSLException("TODO"); +case NOT_HANDSHAKING: { +throw new SSLException( + sm.getString("asyncChannelWrapperSecure.notHandshaking")); } } } @@ -424,13 +425,14 @@ public class AsyncChannelWrapperSecure i if (resultStatus != Status.OK && (wrap || resultStatus != Status.BUFFER_UNDERFLOW)) { -throw new SSLException("TODO"); +throw new SSLException( +sm.getString("asyncChannelWrapperSecure.check.notOk", resultStatus)); } if (wrap && result.bytesConsumed() != 0) { -throw new SSLException("TODO"); +throw new SSLException(sm.getString("asyncChannelWrapperSecure.check.wrap")); } if (!wrap && result.bytesProduced() != 0) { -throw new SSLException("TODO"); +throw new SSLException(sm.getString("asyncChannelWrapperSecure.check.unwrap")); } } } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1716763&r1=1716762&r2=1716763&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Thu Nov 26 20:30:46 2015 @@ -16,9 +16,13 @@ asyncChannelGroup.createFail=Unable to create dedicated AsynchronousChannelGroup for WebSocket clients which is required to prevent memory leaks in complex class loader environments like JavaEE containers asyncChannelWrapperSecure.closeFail=Failed to close channel cleanly +asyncChannelWrapperSecure.check.notOk=TLS handshake returned an unexpected status [{0}] +asyncChannelWrapperSecure.check.unwrap=Bytes were written to the output during a read +asyncChannelWrapperSecure.check.wrap=Bytes were consumed from the input during a write asyncChannelWrapperSecure.concurrentRead=Concurrent read operations are not permitted asyncChannelWrapperSecure.concurrentWrite=Concurrent write operations are not permitted asyncChannelWrapperSecure.eof=Unexpected end of stream +asyncChannelWrapperSecure.notHandshaking=Unexpected state [NOT_HANDSHAKING] during TLS handshake asyncChannelWrapperSecure.readOverflow=Buffer overflow. [{0}] bytes to write into a [{1}] byte buffer that already contained [{2}] bytes. asyncChannelWrapperSecure.statusUnwrap=Unexpected Status of SSLEngineResult after an unwrap() operation asyncChannelWrapperSecure.statusWrap=Unexpected Status of SSLEngineResult after a wrap() operation @@ -75,10 +79,11 @@ wsRemoteEndpoint.concurrentMessageSend=M wsRemoteEndpoint.flushOnCloseFailed=Batched messages still enabled after session has been closed. Unable to flush remaining batched message. wsRemoteEndpoint.invalidEncoder=The specified encoder of type [{0}] could not be instantiated wsRemoteEndpoint.noEncoder=No encoder specified for object of class [{0}] -wsRemoteEndpoint.wrongState=The remote endpoint was in state [{0}] which is an invalid state for called method wsRemoteEndpoint.nullData=Invalid null data argument wsRemoteEndpoint.nullHandler=Invalid null handler argument +wsRemoteEndpoint.sendInterupt=The current t
svn commit: r1716764 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: markt Date: Thu Nov 26 20:40:09 2015 New Revision: 1716764 URL: http://svn.apache.org/viewvc?rev=1716764&view=rev Log: Remove unreachable code Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1716764&r1=1716763&r2=1716764&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Nov 26 20:40:09 2015 @@ -2291,10 +2291,6 @@ public class AprEndpoint extends Abstrac if (state == Handler.SocketState.CLOSED) { // Close socket and pool closeSocket(socket.getSocket().longValue()); -} else if (state == Handler.SocketState.ASYNC_END) { -SocketProcessor proc = new SocketProcessor(socket, -SocketStatus.OPEN_READ); -getExecutor().execute(proc); } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716766 - in /tomcat/trunk/java/org/apache: coyote/AbstractProcessorLight.java coyote/AsyncStateMachine.java tomcat/util/net/AbstractEndpoint.java
Author: markt Date: Thu Nov 26 20:53:26 2015 New Revision: 1716766 URL: http://svn.apache.org/viewvc?rev=1716766&view=rev Log: Complete a TODO. Remove the hack that added ASYNC_END as a SocketState. Simplify processing loop. Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java?rev=1716766&r1=1716765&r2=1716766&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java Thu Nov 26 20:53:26 2015 @@ -54,16 +54,6 @@ public abstract class AbstractProcessorL // Do nothing here, just wait for it to get recycled } else if (isAsync() || isUpgrade()) { state = dispatch(status); -} else if (state == SocketState.ASYNC_END) { -state = dispatch(status); -if (state == SocketState.OPEN) { -// There may be pipe-lined data to read. If the data -// isn't processed now, execution will exit this -// loop and call release() which will recycle the -// processor (and input buffer) deleting any -// pipe-lined data. To avoid this, process it now. -state = service(socketWrapper); -} } else if (status == SocketStatus.OPEN_WRITE) { // Extra write event likely after async, ignore state = SocketState.LONG; @@ -73,6 +63,18 @@ public abstract class AbstractProcessorL if (state != SocketState.CLOSED && isAsync()) { state = asyncPostProcess(); +if (state != SocketState.LONG) { +// Async has ended. +state = dispatch(status); +if (state == SocketState.OPEN) { +// There may be pipe-lined data to read. If the data +// isn't processed now, execution will exit this +// loop and call release() which will recycle the +// processor (and input buffer) deleting any +// pipe-lined data. To avoid this, process it now. +state = service(socketWrapper); +} +} } if (getLog().isDebugEnabled()) { @@ -86,8 +88,7 @@ public abstract class AbstractProcessorL // dispatches to process. dispatches = getIteratorAndClearDispatches(); } -} while (state == SocketState.ASYNC_END || -dispatches != null && state != SocketState.CLOSED); +} while (dispatches != null && state != SocketState.CLOSED); return state; } Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1716766&r1=1716765&r2=1716766&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Thu Nov 26 20:53:26 2015 @@ -241,17 +241,17 @@ public class AsyncStateMachine { } else if (state == AsyncState.MUST_COMPLETE) { asyncCtxt.fireOnComplete(); state = AsyncState.DISPATCHED; -return SocketState.ASYNC_END; +return SocketState.OPEN; } else if (state == AsyncState.COMPLETING) { asyncCtxt.fireOnComplete(); state = AsyncState.DISPATCHED; -return SocketState.ASYNC_END; +return SocketState.OPEN; } else if (state == AsyncState.MUST_DISPATCH) { state = AsyncState.DISPATCHING; -return SocketState.ASYNC_END; +return SocketState.OPEN; } else if (state == AsyncState.DISPATCHING) { state = AsyncState.DISPATCHED; -return SocketState.ASYNC_END; +return SocketState.OPEN; } else if (state == AsyncState.STARTED) { // This can occur if an async listener does a dispatch to an async // servlet during onTimeout Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1716766&r1=1716765&r2=1716766&view=diff == --- tomcat/trunk/ja
svn commit: r1716767 - /tomcat/trunk/test/webapp/WEB-INF/classes/org/apache/tomcat/Bug58096.java
Author: markt Date: Thu Nov 26 20:59:00 2015 New Revision: 1716767 URL: http://svn.apache.org/viewvc?rev=1716767&view=rev Log: Fix typo Modified: tomcat/trunk/test/webapp/WEB-INF/classes/org/apache/tomcat/Bug58096.java Modified: tomcat/trunk/test/webapp/WEB-INF/classes/org/apache/tomcat/Bug58096.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/WEB-INF/classes/org/apache/tomcat/Bug58096.java?rev=1716767&r1=1716766&r2=1716767&view=diff == --- tomcat/trunk/test/webapp/WEB-INF/classes/org/apache/tomcat/Bug58096.java (original) +++ tomcat/trunk/test/webapp/WEB-INF/classes/org/apache/tomcat/Bug58096.java Thu Nov 26 20:59:00 2015 @@ -17,7 +17,7 @@ package org.apache.tomcat; /** - * Contains no functionality since it is only used tp test the code source + * Contains no functionality since it is only used to test the code source * assigned to the class. */ public class Bug58096 { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/686 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1716766 Blamelist: markt BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716771 - in /tomcat/trunk/java/org/apache: coyote/AbstractProcessorLight.java coyote/AsyncStateMachine.java tomcat/util/net/AbstractEndpoint.java
Author: markt Date: Thu Nov 26 21:35:04 2015 New Revision: 1716771 URL: http://svn.apache.org/viewvc?rev=1716771&view=rev Log: Revert r1716766 while I re-work it. Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java?rev=1716771&r1=1716770&r2=1716771&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java Thu Nov 26 21:35:04 2015 @@ -54,6 +54,16 @@ public abstract class AbstractProcessorL // Do nothing here, just wait for it to get recycled } else if (isAsync() || isUpgrade()) { state = dispatch(status); +} else if (state == SocketState.ASYNC_END) { +state = dispatch(status); +if (state == SocketState.OPEN) { +// There may be pipe-lined data to read. If the data +// isn't processed now, execution will exit this +// loop and call release() which will recycle the +// processor (and input buffer) deleting any +// pipe-lined data. To avoid this, process it now. +state = service(socketWrapper); +} } else if (status == SocketStatus.OPEN_WRITE) { // Extra write event likely after async, ignore state = SocketState.LONG; @@ -63,18 +73,6 @@ public abstract class AbstractProcessorL if (state != SocketState.CLOSED && isAsync()) { state = asyncPostProcess(); -if (state != SocketState.LONG) { -// Async has ended. -state = dispatch(status); -if (state == SocketState.OPEN) { -// There may be pipe-lined data to read. If the data -// isn't processed now, execution will exit this -// loop and call release() which will recycle the -// processor (and input buffer) deleting any -// pipe-lined data. To avoid this, process it now. -state = service(socketWrapper); -} -} } if (getLog().isDebugEnabled()) { @@ -88,7 +86,8 @@ public abstract class AbstractProcessorL // dispatches to process. dispatches = getIteratorAndClearDispatches(); } -} while (dispatches != null && state != SocketState.CLOSED); +} while (state == SocketState.ASYNC_END || +dispatches != null && state != SocketState.CLOSED); return state; } Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1716771&r1=1716770&r2=1716771&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Thu Nov 26 21:35:04 2015 @@ -241,17 +241,17 @@ public class AsyncStateMachine { } else if (state == AsyncState.MUST_COMPLETE) { asyncCtxt.fireOnComplete(); state = AsyncState.DISPATCHED; -return SocketState.OPEN; +return SocketState.ASYNC_END; } else if (state == AsyncState.COMPLETING) { asyncCtxt.fireOnComplete(); state = AsyncState.DISPATCHED; -return SocketState.OPEN; +return SocketState.ASYNC_END; } else if (state == AsyncState.MUST_DISPATCH) { state = AsyncState.DISPATCHING; -return SocketState.OPEN; +return SocketState.ASYNC_END; } else if (state == AsyncState.DISPATCHING) { state = AsyncState.DISPATCHED; -return SocketState.OPEN; +return SocketState.ASYNC_END; } else if (state == AsyncState.STARTED) { // This can occur if an async listener does a dispatch to an async // servlet during onTimeout Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1716771&r1=1716770&r2=1716771&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/688 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1716771 Blamelist: markt Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716778 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Author: markt Date: Thu Nov 26 22:34:01 2015 New Revision: 1716778 URL: http://svn.apache.org/viewvc?rev=1716778&view=rev Log: Correct diagram. postProcess() does not transition ERROR to DISPATCHED. Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1716778&r1=1716777&r2=1716778&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Thu Nov 26 22:34:01 2015 @@ -55,13 +55,13 @@ import org.apache.tomcat.util.security.P * |-»--| * | \|/ * | |--«---ERROR---«---| - * | | complete() /|\ | \ | - * | | | | \---| | - * | | | | |dispatch() | - * | | | |postProcess()\|/ | - * | | error()| | | | - * | | | | |--|timeout() | | - * | | postProcess() | \|/ | \|/ | auto | + * | | complete() /|\ \ | + * | | | \---| | + * | | | |dispatch() | + * | | |\|/ | + * | | error()| | | + * | | | |--|timeout() | | + * | | postProcess() | | \|/ | auto | * | | |---»DISPATCHED«-- | --COMPLETING«-| | * | | | /|\ | | | /|\ | | * | | ||---»---| | | |--| | | - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1716782 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Author: markt Date: Thu Nov 26 22:53:40 2015 New Revision: 1716782 URL: http://svn.apache.org/viewvc?rev=1716782&view=rev Log: More diagram fixes auto -> postProcess() Add dispatched() Correct transitions from MUST_DISPATCH Add missing NO-OP transitions Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1716782&r1=1716781&r2=1716782&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Thu Nov 26 22:53:40 2015 @@ -61,29 +61,32 @@ import org.apache.tomcat.util.security.P * | | |\|/ | * | | error()| | | * | | | |--|timeout() | | - * | | postProcess() | | \|/ | auto | + * | | postProcess() | | \|/ | postProcess() | * | | |---»DISPATCHED«-- | --COMPLETING«-| | * | | | /|\ | | | /|\ | | * | | ||---»---| | | |--| | | * | | ^| |startAsync() | timeout() | | * | | || | | | | * | \|/|| complete() \|/ postProcess() | | | - * | MUST_COMPLETE-«- | «--STARTING--»- | | ^ | - * | /|\/|\ | | | | complete() | | - * | | | | | | | /---| | - * | | | ^ |dispatch() | |/ | - * | | | | | | | / | - * | | | | \|/|\|/ / postProcess() | - * | | | |«MUST_DISPATCH-«-| STARTED«-«-| | - * | | | | auto/|\ / | | | | - * | | | | | / | | ^ | - * ^ | ^ | | / | |asyncOperation() | | - * | | | ^ |/| | | | - * | | | | | |-/ | |--READ_WRITE_OP--»---| | - * | | | | | |dispatch() | | | | | - * | | | | | | auto| | | | error()| - * | | | | auto |\|/ | dispatch()| | |-»| + * | MUST_COMPLETE-«- | «--STARTING--»- | -| ^ | + * | /|\/|\ | | | | complete() | | + * | | | | | | postProcess()| /--| | + * | | | ^ |dispatch() ||-| |/ | + * | | | | | || | | / | + * | | | | \|/||\|/ \|/ / postProcess() | + * | | | | MUST_DISPATCH-«-| |--«--STARTED«-«-| | + * | | | | /|\ | / | | | | + * | | | | ||postProcess()/ | | ^ | + * ^ | ^ | ||dispatched()/ | |asyncOperation() | | + * | | | ^ || /| | | | + * | | | | |||-/ | |»-READ_WRITE_OP--»---| | + * | | | | |||dispatch() | | | | | + * | | | |postProcess() ||| timeout()| | | | error()| + * | | | |dispatched() | \|/ \|/
svn commit: r1716783 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Author: markt Date: Thu Nov 26 22:56:36 2015 New Revision: 1716783 URL: http://svn.apache.org/viewvc?rev=1716783&view=rev Log: postProcess() -> post() to make the diagram easier to read Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1716783&r1=1716782&r2=1716783&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Thu Nov 26 22:56:36 2015 @@ -61,27 +61,27 @@ import org.apache.tomcat.util.security.P * | | |\|/ | * | | error()| | | * | | | |--|timeout() | | - * | | postProcess() | | \|/ | postProcess() | + * | | post() | | \|/ | post() | * | | |---»DISPATCHED«-- | --COMPLETING«-| | * | | | /|\ | | | /|\ | | * | | ||---»---| | | |--| | | * | | ^| |startAsync() | timeout() | | * | | || | | | | - * | \|/|| complete() \|/ postProcess() | | | + * | \|/|| complete() \|/ post() | | | * | MUST_COMPLETE-«- | «--STARTING--»- | -| ^ | * | /|\/|\ | | | | complete() | | - * | | | | | | postProcess()| /--| | + * | | | | | |post()| /--| | * | | | ^ |dispatch() ||-| |/ | * | | | | | || | | / | - * | | | | \|/||\|/ \|/ / postProcess() | + * | | | | \|/||\|/ \|/ / post() | * | | | | MUST_DISPATCH-«-| |--«--STARTED«-«-| | * | | | | /|\ | / | | | | - * | | | | ||postProcess()/ | | ^ | + * | | | | ||post() / | | ^ | * ^ | ^ | ||dispatched()/ | |asyncOperation() | | * | | | ^ || /| | | | * | | | | |||-/ | |»-READ_WRITE_OP--»---| | * | | | | |||dispatch() | | | | | - * | | | |postProcess() ||| timeout()| | | | error()| + * | | | |post() ||| timeout()| | | | error()| * | | | |dispatched() | \|/ \|/ | dispatch()| | |-»| * | | | |---«-- | ---DISPATCHING«-«-- | --«| | * | | | | |^ | | - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/690 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1716783 Blamelist: markt BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org