svn commit: r1683064 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2Parser.java LocalStrings.properties

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 09:45:31 2015
New Revision: 1683064

URL: http://svn.apache.org/r1683064
Log:
Copy (untested) priority frame support from Http2UpgradeHandler to Http2Parser

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1683064r1=1683063r2=1683064view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Tue Jun  2 
09:45:31 2015
@@ -35,6 +35,7 @@ class Http2Parser implements HeaderEmitt
 
 private static final int FRAME_TYPE_DATA = 0;
 private static final int FRAME_TYPE_HEADERS = 1;
+private static final int FRAME_TYPE_PRIORITY = 2;
 private static final int FRAME_TYPE_SETTINGS = 4;
 
 private final String connectionId;
@@ -91,6 +92,9 @@ class Http2Parser implements HeaderEmitt
 case FRAME_TYPE_HEADERS:
 readHeadersFrame(streamId, flags, payloadSize);
 break;
+case FRAME_TYPE_PRIORITY:
+processFramePriority(streamId, flags, payloadSize);
+break;
 case FRAME_TYPE_SETTINGS:
 readSettingsFrame(streamId, flags, payloadSize);
 break;
@@ -148,45 +152,6 @@ class Http2Parser implements HeaderEmitt
 }
 
 
-private void readSettingsFrame(int streamId, int flags, int payloadSize) 
throws IOException {
-if (log.isDebugEnabled()) {
-log.debug(sm.getString(http2Parser.processFrame, connectionId,
-Integer.toString(streamId), Integer.toString(flags),
-Integer.toString(payloadSize)));
-}
-
-// Validate the frame
-if (streamId != 0) {
-throw new 
Http2Exception(sm.getString(http2Parser.processFrameSettings.invalidStream,
-Integer.toString(streamId)), 0, 
Http2Exception.FRAME_SIZE_ERROR);
-}
-if (payloadSize % 6 != 0) {
-throw new 
Http2Exception(sm.getString(http2Parser.processFrameSettings.invalidPayloadSize,
-Integer.toString(payloadSize)), 0, 
Http2Exception.FRAME_SIZE_ERROR);
-}
-if (payloadSize  0  (flags  0x1) != 0) {
-throw new 
Http2Exception(sm.getString(http2Parser.processFrameSettings.ackWithNonZeroPayload),
-0, Http2Exception.FRAME_SIZE_ERROR);
-}
-
-if (payloadSize == 0) {
-// Either an ACK or an empty settings frame
-if ((flags  0x1) != 0) {
-output.settingsAck();
-}
-} else {
-// Process the settings
-byte[] setting = new byte[6];
-for (int i = 0; i  payloadSize / 6; i++) {
-input.fill(true, setting);
-int id = ByteUtil.getTwoBytes(setting, 0);
-long value = ByteUtil.getFourBytes(setting, 2);
-output.setting(id, value);
-}
-}
-}
-
-
 private void readHeadersFrame(int streamId, int flags, int payloadSize) 
throws IOException {
 if (log.isDebugEnabled()) {
 log.debug(sm.getString(http2Parser.processFrame, connectionId,
@@ -266,6 +231,72 @@ class Http2Parser implements HeaderEmitt
 }
 
 
+private void processFramePriority(int flags, int streamId, int 
payloadSize) throws IOException {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(http2Parser.processFrame, connectionId,
+Integer.toString(streamId), Integer.toString(flags),
+Integer.toString(payloadSize)));
+}
+// Validate the frame
+if (streamId == 0) {
+throw new 
Http2Exception(sm.getString(http2Parser.processFramePriority.invalidStream),
+0, Http2Exception.PROTOCOL_ERROR);
+}
+if (payloadSize != 5) {
+throw new 
Http2Exception(sm.getString(http2Parser.processFramePriority.invalidPayloadSize,
+Integer.toString(payloadSize)), streamId, 
Http2Exception.FRAME_SIZE_ERROR);
+}
+
+byte[] payload = new byte[5];
+input.fill(true, payload);
+
+boolean exclusive = ByteUtil.isBit7Set(payload[0]);
+int parentStreamId = ByteUtil.get31Bits(payload, 0);
+int weight = ByteUtil.getOneByte(payload, 4) + 1;
+
+output.reprioritise(streamId, parentStreamId, exclusive, weight);
+}
+
+
+private void readSettingsFrame(int streamId, int flags, int payloadSize) 
throws IOException {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(http2Parser.processFrame, connectionId,
+Integer.toString(streamId), 

[GUMP@vmgump]: Project tomcat-trunk-test-apr (in module tomcat-trunk) failed

2015-06-02 Thread Bill Barker
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-trunk-test-apr has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 19 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-apr :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/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-trunk/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-APR/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/gump_work/build_tomcat-trunk_tomcat-trunk-test-apr.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 39 mins 32 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.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150602-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native-trunk/dest-20150602/lib 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150602.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150602-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -Dexecute.test.nio=false 
 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-master/dest-20150602/bin/openssl
 -Dexecute.test.apr=true -Dtest.excludePerformance=true 
-Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-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-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/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-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat

[GUMP@vmgump]: Project tomcat-trunk-test-nio2 (in module tomcat-trunk) failed

2015-06-02 Thread Bill Barker
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-trunk-test-nio2 has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 19 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-nio2 :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-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-trunk/output/logs-NIO2
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio2.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio2 (Type: Build)
Work ended in a state of : Failed
Elapsed: 39 mins 56 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.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO2 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150602-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150602.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150602-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-master/dest-20150602/bi
 n/openssl -Dexecute.test.apr=false -Dtest.excludePerformance=true 
-Dexecute.test.nio2=true 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-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-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/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-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu
 
ild/lib/tomcat

buildbot exception in ASF Buildbot on tomcat-trunk

2015-06-02 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/1311

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] 1683144
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




-
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

2015-06-02 Thread buildbot
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/1310

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] 1683141
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: r1683182 - in /tomcat/trunk/test/org/apache/coyote/http2: Http2TestBase.java TestHttp2Section_3_5.java

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 20:48:01 2015
New Revision: 1683182

URL: http://svn.apache.org/r1683182
Log:
Confirm connection is dropped if the client preface is skipped

Added:
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_5.java   (with 
props)
Modified:
tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java

Modified: tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java?rev=1683182r1=1683181r2=1683182view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java Tue Jun  2 
20:48:01 2015
@@ -54,6 +54,10 @@ public abstract class Http2TestBase exte
 { 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 };
 static final String EMPTY_HTTP2_SETTINGS_HEADER;
 
+private static final byte[] PING_FRAME = new byte[] {
+0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
 static {
 byte[] empty = new byte[0];
 EMPTY_HTTP2_SETTINGS_HEADER = HTTP2-Settings:  + 
Base64.encodeBase64String(empty) + \r\n;
@@ -252,6 +256,12 @@ public abstract class Http2TestBase exte
 os.flush();
 }
 
+
+void sendPing() throws IOException {
+os.write(PING_FRAME);
+os.flush();
+}
+
 
 private static class TestInput implements Http2Parser.Input {
 

Added: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_5.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_5.java?rev=1683182view=auto
==
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_5.java (added)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_5.java Tue Jun 
 2 20:48:01 2015
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the License); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.coyote.http2;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class TestHttp2Section_3_5 extends Http2TestBase {
+
+@Test(expected=IOException.class)
+public void testNoConnectionPreface() throws Exception {
+enableHttp2();
+configureAndStartWebApplication();
+openClientConnection();
+doHttpUpgrade();
+// Should send client preface here
+sendPing();
+// Send several pings else server will block waiting for the client
+// preface which is longer than a single ping.
+sendPing();
+sendPing();
+validateHttp2InitialResponse();
+}
+}

Propchange: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_5.java
--
svn:eol-style = native



-
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

2015-06-02 Thread buildbot
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/1313

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] 1683191
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: r1683191 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2UpgradeHandler.java Stream.java StreamStateMachine.java

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 21:38:07 2015
New Revision: 1683191

URL: http://svn.apache.org/r1683191
Log:
First pass at a state machine for tracking stream state.
Lots of TODOs and not yet fully integrated into the processing.

Added:
tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java   (with 
props)
Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/Stream.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=1683191r1=1683190r2=1683191view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Tue Jun  
2 21:38:07 2015
@@ -737,9 +737,10 @@ public class Http2UpgradeHandler extends
 
 @Override
 public void headersEnd(int streamId) {
+Stream stream = getStream(streamId);
+stream.headersEnd();
 // Process this stream on a container thread
-StreamProcessor streamProcessor = new StreamProcessor(
-getStream(streamId), adapter, socketWrapper);
+StreamProcessor streamProcessor = new StreamProcessor(stream, adapter, 
socketWrapper);
 streamProcessor.setSslSupport(sslSupport);
 socketWrapper.getEndpoint().getExecutor().execute(streamProcessor);
 }

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=1683191r1=1683190r2=1683191view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Tue Jun  2 21:38:07 
2015
@@ -42,6 +42,7 @@ public class Stream extends AbstractStre
 private final Response coyoteResponse = new Response();
 private final StreamInputBuffer inputBuffer = new StreamInputBuffer();
 private final StreamOutputBuffer outputBuffer = new StreamOutputBuffer();
+private final StreamStateMachine state = new StreamStateMachine();
 
 
 public Stream(Integer identifier, Http2UpgradeHandler handler) {
@@ -58,6 +59,11 @@ public class Stream extends AbstractStre
 this.coyoteRequest.setInputBuffer(inputBuffer);
 this.coyoteResponse.setOutputBuffer(outputBuffer);
 this.coyoteRequest.setResponse(coyoteResponse);
+if (coyoteRequest.isFinished()) {
+// Update the state machine
+state.receiveHeaders();
+state.recieveEndOfStream();
+}
 }
 
 
@@ -213,6 +219,11 @@ public class Stream extends AbstractStre
 }
 
 
+void headersEnd() {
+state.receiveHeaders();
+}
+
+
 void setEndOfStream() {
 // TODO This is temporary until the state machine for a stream is
 // implemented

Added: tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java?rev=1683191view=auto
==
--- tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java (added)
+++ tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java Tue Jun  
2 21:38:07 2015
@@ -0,0 +1,143 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the License); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.coyote.http2;
+
+/**
+ * See a href=https://tools.ietf.org/html/rfc7540#section-5.1;state
+ * diagram/a in RFC 7540.
+ * br
+ * The following additions are supported by this state machine:
+ * ul
+ * lidifferentiate between closed (normal) and closed caused by reset/li
+ * liallow a transition from idle to closed if reset is sent or received/li
+ * /ul
+ *
+ */
+public class StreamStateMachine {
+
+private State state = State.IDLE;
+
+
+public synchronized void sendPushPromise() {
+if (state == State.IDLE) {
+state = State.RESERVED_LOCAL;
+} else {
+  

Re: Trimming Accepted Ciphers

2015-06-02 Thread Christopher Schultz
Robert,

On 6/2/15 10:40 AM, Robert Paasche wrote:
 Hi,
 
 I'm using tcnativ with:
 SSLCipherSuite=EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA:EECDH:EDH+AESGCM:EDH:+3DES:ECDH+AESGCM:ECDH+AES:ECDH:AES:HIGH:MEDIUM:!RC4:!CAMELLIA:!SEED:!aNULL:!MD5:!eNULL:!LOW:!EXP:!DSS:!PSK:!SRP
 
 To generate a List of ciphers for your usecase simply do:
  openssl ciphers -v
 'EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA:EECDH:EDH+AESGCM:EDH:+3DES:ECDH+AESGCM:ECDH+AES:ECDH:AES:HIGH:MEDIUM:!RC4:!CAMELLIA:!SEED:!aNULL:!MD5:!eNULL:!LOW:!EXP:!DSS:!PSK:!SRP'

The OP is quite clearly using JSSE for TLS, so your suggested
SSLCipherSuite is not relevant for him.

But! If the OP is using Tomcat 8, he can use OpenSSL-style cipher
selection (see http://tomcat.apache.org/tomcat-8.0-doc/config/http.html,
configuration attribute ciphers). Note that you will have to use the
ciphers configuration attribute and *not* SSLCipherSuite, which is
only applicable for the OpenSSL-based native (APR) connector.

I would recommend using OpenSSL-style cipher selection criteria, because
you can use rule-out style semantics like !RC4 meaning don't allow
any ciphers which use RC4. JSSE usually requires that you specify a
whitelist which is quite tedious to maintain.

-chris



signature.asc
Description: OpenPGP digital signature


[Bug 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

--- Comment #8 from Christopher Schultz ch...@christopherschultz.net ---
to add to Chuck's comment, you will need to post the stack trace of the actual
exception that occurs on the server side. I suspect once you find the stack
trace, you'll understand the problem, and likely the solution to it.

-- 
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 57977] The original class loader isn't re-bound to the thread in PersistentValve.invoke()

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57977

--- Comment #3 from Christopher Schultz ch...@christopherschultz.net ---
Great! That's much easier to see what you actually changed (just added a
try/finally block)! It looked like you had made many more changes than that.

-- 
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



about Bug 57701

2015-06-02 Thread Fernando Boaglio
Hello,

I have some thoughts about Mark's comments (
https://bz.apache.org/bugzilla/show_bug.cgi?id=57701#c3 ) and I would
like to discuss it here =)

 I'm not convinced of the need for this feature but I don't object to it being 
 added.
 Overall the patch looks good. There is the odd s/reload/redploy/ required but 
 that looks like copy/paste errors and is easily fixed.

I thought redeploy was another option and not a replacement for reload .
Is this assumption correct ?

 I'm more concerned that the actual redeploy code is not correct.
 The issues I could see from a code inspection (I haven't tried applying the 
 patch) are:
  - it assumes that the web application is deployed as a WAR
Correct, if is not a WAR, the reload option should be enough.

 - it assumes autoDeployment is enabled
I don't know.

  - it doesn't mark the web application as being serviced
I don't know either. Sorry =(

 I'd expect to see the following:
 - the context marked as serviced
 - the context removed from the host
 - check() being used to redeploy it
 - the serviced mark removed from the host

What is the main reason for the check method, the source says Invoke
the check method on the deployer, but I'm not sure what it really
does.

Same thing to the serviced methods.

Can someone give me a hint please ? =)

-- 
[]'s
Fernando Boaglio

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1683070 - in /tomcat/trunk: java/org/apache/coyote/http2/Http2Parser.java java/org/apache/coyote/http2/Http2UpgradeHandler.java java/org/apache/coyote/http2/LocalStrings.properties test/o

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 10:29:20 2015
New Revision: 1683070

URL: http://svn.apache.org/r1683070
Log:
Copy (untested) ping and window update frame support from Http2UpgradeHandler 
to Http2Parser

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1683070r1=1683069r2=1683070view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Tue Jun  2 
10:29:20 2015
@@ -37,6 +37,8 @@ class Http2Parser implements HeaderEmitt
 private static final int FRAME_TYPE_HEADERS = 1;
 private static final int FRAME_TYPE_PRIORITY = 2;
 private static final int FRAME_TYPE_SETTINGS = 4;
+private static final int FRAME_TYPE_PING = 6;
+private static final int FRAME_TYPE_WINDOW_UPDATE = 8;
 
 private final String connectionId;
 private final Input input;
@@ -93,11 +95,17 @@ class Http2Parser implements HeaderEmitt
 readHeadersFrame(streamId, flags, payloadSize);
 break;
 case FRAME_TYPE_PRIORITY:
-processFramePriority(streamId, flags, payloadSize);
+readPriorityFrame(streamId, flags, payloadSize);
 break;
 case FRAME_TYPE_SETTINGS:
 readSettingsFrame(streamId, flags, payloadSize);
 break;
+case FRAME_TYPE_PING:
+readPingFrame(streamId, flags, payloadSize);
+break;
+case FRAME_TYPE_WINDOW_UPDATE:
+readWindowUpdateFrame(streamId, flags, payloadSize);
+break;
 // TODO: Missing types
 default:
 readUnknownFrame(streamId, frameType, flags, payloadSize);
@@ -231,7 +239,7 @@ class Http2Parser implements HeaderEmitt
 }
 
 
-private void processFramePriority(int flags, int streamId, int 
payloadSize) throws IOException {
+private void readPriorityFrame(int flags, int streamId, int payloadSize) 
throws IOException {
 if (log.isDebugEnabled()) {
 log.debug(sm.getString(http2Parser.processFrame, connectionId,
 Integer.toString(streamId), Integer.toString(flags),
@@ -297,6 +305,66 @@ class Http2Parser implements HeaderEmitt
 }
 
 
+private void readPingFrame(int flags, int streamId, int payloadSize)
+throws IOException {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(http2Parser.processFrame, connectionId,
+Integer.toString(streamId), Integer.toString(flags),
+Integer.toString(payloadSize)));
+}
+// Validate the frame
+if (streamId != 0) {
+throw new 
Http2Exception(sm.getString(http2Parser.processFramePing.invalidStream,
+Integer.toString(streamId)), 0, 
Http2Exception.FRAME_SIZE_ERROR);
+}
+if (payloadSize != 8) {
+throw new 
Http2Exception(sm.getString(http2Parser.processFramePing.invalidPayloadSize,
+Integer.toString(payloadSize)), 0, 
Http2Exception.FRAME_SIZE_ERROR);
+}
+if ((flags  0x1) == 0) {
+// Read the payload
+byte[] payload = new byte[8];
+input.fill(true, payload);
+output.pingReceive(payload);
+} else {
+output.pingAck();
+}
+}
+
+
+private void readWindowUpdateFrame(int flags, int streamId, int 
payloadSize)
+throws IOException {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(http2Parser.processFrame, connectionId,
+Integer.toString(streamId), Integer.toString(flags),
+Integer.toString(payloadSize)));
+}
+// Validate the frame
+if (payloadSize != 4) {
+// Use stream 0 since this is always a connection error
+throw new 
Http2Exception(sm.getString(http2Parser.processFrameWindowUpdate.invalidPayloadSize,
+Integer.toString(payloadSize)), 0, 
Http2Exception.FRAME_SIZE_ERROR);
+}
+
+byte[] payload = new byte[4];
+input.fill(true,  payload);
+int windowSizeIncrement = ByteUtil.get31Bits(payload, 0);
+
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString(http2Parser.processFrameWindowUpdate.debug, 
connectionId,
+Integer.toString(streamId), 
Integer.toString(windowSizeIncrement)));
+}
+
+// Validate the data
+if (windowSizeIncrement == 0) {
+throw new 

svn commit: r1683081 - /tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 11:23:56 2015
New Revision: 1683081

URL: http://svn.apache.org/r1683081
Log:
Avid concurrent writes

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=1683081r1=1683080r2=1683081view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Tue Jun  
2 11:23:56 2015
@@ -355,10 +355,12 @@ public class Http2UpgradeHandler extends
 ByteUtil.setThreeBytes(payloadLength, 0, payload.length);
 
 try {
-socketWrapper.write(true, payloadLength, 0, payloadLength.length);
-socketWrapper.write(true, GOAWAY, 0, GOAWAY.length);
-socketWrapper.write(true, payload, 0,  payload.length);
-socketWrapper.flush(true);
+synchronized (socketWrapper) {
+socketWrapper.write(true, payloadLength, 0, 
payloadLength.length);
+socketWrapper.write(true, GOAWAY, 0, GOAWAY.length);
+socketWrapper.write(true, payload, 0,  payload.length);
+socketWrapper.flush(true);
+}
 } catch (IOException ioe) {
 // Ignore. GOAWAY is sent on a best efforts basis and the original
 // error has already been logged.
@@ -440,9 +442,11 @@ public class Http2UpgradeHandler extends
 
 
 private void processWrites() throws IOException {
-if (socketWrapper.flush(false)) {
-socketWrapper.registerWriteInterest();
-return;
+synchronized (socketWrapper) {
+if (socketWrapper.flush(false)) {
+socketWrapper.registerWriteInterest();
+return;
+}
 }
 }
 
@@ -761,9 +765,11 @@ public class Http2UpgradeHandler extends
 @Override
 public void pingReceive(byte[] payload) throws IOException {
 // Echo it back
-socketWrapper.write(true, PING_ACK, 0, PING_ACK.length);
-socketWrapper.write(true, payload, 0, payload.length);
-socketWrapper.flush(true);
+synchronized (socketWrapper) {
+socketWrapper.write(true, PING_ACK, 0, PING_ACK.length);
+socketWrapper.write(true, payload, 0, payload.length);
+socketWrapper.flush(true);
+}
 }
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

Chuck Caldarale chuck.caldar...@unisys.com changed:

   What|Removed |Added

   Severity|blocker |trivial
 Resolution|--- |INVALID
 Status|REOPENED|RESOLVED

--- Comment #7 from Chuck Caldarale chuck.caldar...@unisys.com ---
As stated before, the browser has not crashed, and there is zero evidence of a
Tomcat problem.  Your Connector configuration is likely wrong for your
environment, but you didn't bother to present that.  (Hint: look at
maxSwallowSize.)  Post your query on the users' mailing list.  Do not reopen
this issue until discussion on the mailing list indicates it's appropriate to
do so.

-- 
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 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

--- Comment #4 from pgarnaik.wo...@gmail.com ---
Created attachment 32781
  -- https://bz.apache.org/bugzilla/attachment.cgi?id=32781action=edit
Jsp page from the J2EE POC

-- 
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 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

pgarnaik.wo...@gmail.com changed:

   What|Removed |Added

 Resolution|INVALID |---
 Status|RESOLVED|REOPENED

--- Comment #6 from pgarnaik.wo...@gmail.com ---
Issue is obhivious.

1) Screen shots attached for before and after form submit.
2) As per J2EE coding, Its forwarded(or redirected) to upload.jsp.

For reference of other developers, the small POC is also attached in zipped
format.

-- 
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 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

--- Comment #5 from pgarnaik.wo...@gmail.com ---
Created attachment 32782
  -- https://bz.apache.org/bugzilla/attachment.cgi?id=32782action=edit
Servlet from J2EE POC

-- 
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 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

pgarnaik.wo...@gmail.com changed:

   What|Removed |Added

 CC||pgarnaik.wo...@gmail.com

--- Comment #2 from pgarnaik.wo...@gmail.com ---
Created attachment 32779
  -- https://bz.apache.org/bugzilla/attachment.cgi?id=32779action=edit
Before submit screen shot

-- 
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: r1683080 - in /tomcat/trunk: java/org/apache/coyote/http2/Http2Parser.java java/org/apache/coyote/http2/Http2UpgradeHandler.java java/org/apache/coyote/http2/LocalStrings.properties test/o

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 11:13:24 2015
New Revision: 1683080

URL: http://svn.apache.org/r1683080
Log:
Switch to using the Http2Parser for frame processing
 - remove original frame parsing code from Http2UpgradeHandler

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1683080r1=1683079r2=1683080view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Tue Jun  2 
11:13:24 2015
@@ -25,7 +25,7 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
-class Http2Parser implements HeaderEmitter {
+class Http2Parser {
 
 private static final Log log = LogFactory.getLog(Http2Parser.class);
 private static final StringManager sm = 
StringManager.getManager(Http2Parser.class);
@@ -175,9 +175,12 @@ class Http2Parser implements HeaderEmitt
 
 // TODO Handle end of headers flag
 // TODO Handle end of stream flag
-// TODO Handle continutation frames
+// TODO Handle continuation frames
 
-output.headersStart(streamId);
+if (hpackDecoder == null) {
+hpackDecoder = output.getHpackDecoder();
+}
+hpackDecoder.setHeaderEmitter(output.headersStart(streamId));
 
 int padLength = 0;
 boolean padding = (flags  0x08)  0;
@@ -206,11 +209,6 @@ class Http2Parser implements HeaderEmitt
 payloadSize -= optionalLen;
 }
 
-if (hpackDecoder == null) {
-hpackDecoder = output.getHpackDecoder();
-hpackDecoder.setHeaderEmitter(this);
-}
-
 while (payloadSize  0) {
 int toRead = Math.min(headerReadBuffer.remaining(), payloadSize);
 // headerReadBuffer in write mode
@@ -236,10 +234,12 @@ class Http2Parser implements HeaderEmitt
 }
 
 swallow(padLength);
+
+output.headersEnd(streamId);
 }
 
 
-private void readPriorityFrame(int flags, int streamId, int payloadSize) 
throws IOException {
+private void readPriorityFrame(int streamId, int flags, int payloadSize) 
throws IOException {
 if (log.isDebugEnabled()) {
 log.debug(sm.getString(http2Parser.processFrame, connectionId,
 Integer.toString(streamId), Integer.toString(flags),
@@ -305,7 +305,7 @@ class Http2Parser implements HeaderEmitt
 }
 
 
-private void readPingFrame(int flags, int streamId, int payloadSize)
+private void readPingFrame(int streamId, int flags, int payloadSize)
 throws IOException {
 if (log.isDebugEnabled()) {
 log.debug(sm.getString(http2Parser.processFrame, connectionId,
@@ -332,7 +332,7 @@ class Http2Parser implements HeaderEmitt
 }
 
 
-private void readWindowUpdateFrame(int flags, int streamId, int 
payloadSize)
+private void readWindowUpdateFrame(int streamId, int flags, int 
payloadSize)
 throws IOException {
 if (log.isDebugEnabled()) {
 log.debug(sm.getString(http2Parser.processFrame, connectionId,
@@ -423,13 +423,6 @@ class Http2Parser implements HeaderEmitt
 
 void setHpackDecoder(HpackDecoder hpackDecoder) {
 this.hpackDecoder = hpackDecoder;
-hpackDecoder.setHeaderEmitter(this);
-}
-
-
-@Override
-public void emitHeader(String name, String value, boolean neverIndex) {
-output.header(name, value);
 }
 
 
@@ -441,7 +434,7 @@ class Http2Parser implements HeaderEmitt
 /**
  * Fill the given array with data unless non-blocking is requested and
  * no data is available. If any data is available then the buffer will
- * be filled with blocking I/O.
+ * be filled using blocking I/O.
  *
  * @param block Should the first read into the provided buffer be a
  *  blocking read or not.
@@ -472,7 +465,8 @@ class Http2Parser implements HeaderEmitt
 
 
 /**
- *
+ * Interface that must be implemented to receive notifications from the
+ * parser as it processes incoming frames.
  */
 static interface Output {
 
@@ -483,17 +477,16 @@ class Http2Parser implements HeaderEmitt
 void endOfStream(int streamId);
 
 // Header frames
-void headersStart(int streamId);
+HeaderEmitter headersStart(int streamId);
 void reprioritise(int streamId, int parentStreamId, boolean exclusive, 
int weight);
-void header(String 

[Bug 57980] After submitting a multipart form-data, if the Http request object is not parsed and return from server without parsing, causes browser crashed ('program cannot display the webpage' messag

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57980

--- Comment #3 from pgarnaik.wo...@gmail.com ---
Created attachment 32780
  -- https://bz.apache.org/bugzilla/attachment.cgi?id=32780action=edit
After screen shot

-- 
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



Trimming Accepted Ciphers

2015-06-02 Thread Milton Harper
  I ran a ssl scan utility on my Tomcat server and see it allows alot of
SSLv3 and RC4 Ciphers along with a number of others. I'm told the SSLv3 and
RC4 are not allowed and that I should only be using TLS ciphers.

  Adding registry keys has no effect. Modifying the server.xml file does.
I figured out how to remove the SSLv3 entries.  By adding the following to
the SSL area of my server.xml file, all the SSLv3 entries do not show on
the next scan.Part of the problem with this is alot of other information
about accepted SSL Certificates disappears as well.

sslEnabledProtocols=TLSv1,TLSv1.1,TLSv1.2

   For removing the RC4 entries, I reads posts mentioning adding in a
ciphers line so I added the following.  It removed the RC4 entries but also
alot of other ciphers I didn't want removed.

ciphers=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,
TLS_RSA_WITH_AES_256_CBC_SHA

   What is the correct updated informaiton for the ciphers line and maybe
the sslEnabledProtocols as well?  Thank you.


Re: Trimming Accepted Ciphers

2015-06-02 Thread Robert Paasche
Hi,

I'm using tcnativ with:
SSLCipherSuite=EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA:EECDH:EDH+AESGCM:EDH:+3DES:ECDH+AESGCM:ECDH+AES:ECDH:AES:HIGH:MEDIUM:!RC4:!CAMELLIA:!SEED:!aNULL:!MD5:!eNULL:!LOW:!EXP:!DSS:!PSK:!SRP

To generate a List of ciphers for your usecase simply do:
 openssl ciphers -v
'EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA:EECDH:EDH+AESGCM:EDH:+3DES:ECDH+AESGCM:ECDH+AES:ECDH:AES:HIGH:MEDIUM:!RC4:!CAMELLIA:!SEED:!aNULL:!MD5:!eNULL:!LOW:!EXP:!DSS:!PSK:!SRP'

Best,
rob

Robert Paasche
Senior Developer


pripares GmbH
Altheimer Eck 2
80331 München


Tel +49 (0)89 45 22 808 - 30
Fax +49 (0)89 45 22 808 - 58
Mail r.paas...@pripares.com
Web www.pripares.com


Handelsregister: Registergericht München HRB 138701
Sitz der Gesellschaft: München
Geschäftsführer: Aßmann Christoph, Ertl Andreas


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail und der darin enthaltenen Informationen sind nicht
gestattet.


This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

2015-06-02 16:08 GMT+02:00 Milton Harper milton.har...@gmail.com:

   I ran a ssl scan utility on my Tomcat server and see it allows alot of
 SSLv3 and RC4 Ciphers along with a number of others. I'm told the SSLv3 and
 RC4 are not allowed and that I should only be using TLS ciphers.

   Adding registry keys has no effect. Modifying the server.xml file does.
 I figured out how to remove the SSLv3 entries.  By adding the following to
 the SSL area of my server.xml file, all the SSLv3 entries do not show on
 the next scan.Part of the problem with this is alot of other information
 about accepted SSL Certificates disappears as well.

 sslEnabledProtocols=TLSv1,TLSv1.1,TLSv1.2

For removing the RC4 entries, I reads posts mentioning adding in a
 ciphers line so I added the following.  It removed the RC4 entries but also
 alot of other ciphers I didn't want removed.

 ciphers=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,

 TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,
 TLS_RSA_WITH_AES_256_CBC_SHA

What is the correct updated informaiton for the ciphers line and maybe
 the sslEnabledProtocols as well?  Thank you.



svn commit: r1683096 - in /tomcat/trunk: java/org/apache/coyote/UpgradeProtocol.java java/org/apache/coyote/http11/Http11Processor.java java/org/apache/coyote/http2/Http2Protocol.java test/org/apache/

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 12:58:37 2015
New Revision: 1683096

URL: http://svn.apache.org/r1683096
Log:
Correctly implement the section 3.2.1 test, add a new one and then fix the bug 
they highlight.

Modified:
tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java

Modified: tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java?rev=1683096r1=1683095r2=1683096view=diff
==
--- tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java Tue Jun  2 
12:58:37 2015
@@ -77,4 +77,17 @@ public interface UpgradeProtocol {
  * @return An instance of the HTTP upgrade handler for this protocol
  */
 public InternalHttpUpgradeHandler getInteralUpgradeHandler(Adapter 
adapter, Request request);
+
+
+/**
+ * Allows the implementation to examine the request and accept or reject it
+ * based on what it finds.
+ *
+ * @param request The request that included an upgrade header for this
+ *protocol
+ *
+ * @return codetrue/code if the request is accepted, otherwise
+ * codefalse/code
+ */
+public boolean accept(Request request);
 }

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1683096r1=1683095r2=1683096view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Tue Jun  2 
12:58:37 2015
@@ -1035,14 +1035,16 @@ public class Http11Processor extends Abs
 
 UpgradeProtocol upgradeProtocol = 
httpUpgradeProtocols.get(requestedProtocol);
 if (upgradeProtocol != null) {
-// TODO Figure out how to handle request bodies at this
-// point.
+if (upgradeProtocol.accept(request)) {
+// TODO Figure out how to handle request bodies at this
+// point.
 
-InternalHttpUpgradeHandler upgradeHandler =
-upgradeProtocol.getInteralUpgradeHandler(
-getAdapter(), cloneRequest(request));
-action(ActionCode.UPGRADE, upgradeHandler);
-return SocketState.UPGRADING;
+InternalHttpUpgradeHandler upgradeHandler =
+upgradeProtocol.getInteralUpgradeHandler(
+getAdapter(), cloneRequest(request));
+action(ActionCode.UPGRADE, upgradeHandler);
+return SocketState.UPGRADING;
+}
 }
 }
 

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java?rev=1683096r1=1683095r2=1683096view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java Tue Jun  2 
12:58:37 2015
@@ -17,6 +17,7 @@
 package org.apache.coyote.http2;
 
 import java.nio.charset.StandardCharsets;
+import java.util.Enumeration;
 
 import org.apache.coyote.Adapter;
 import org.apache.coyote.Processor;
@@ -77,6 +78,23 @@ public class Http2Protocol implements Up
 }
 
 
+@Override
+public boolean accept(Request request) {
+// Should only be one HTTP2-Settings header
+EnumerationString headers = 
request.getMimeHeaders().values(HTTP2-Settings);
+int count = 0;
+while (headers.hasMoreElements()) {
+count++;
+headers.nextElement();
+}
+if (count != 1) {
+return false;
+}
+
+return true;
+}
+
+
 public long getReadTimeout() {
 return readTimeout;
 }

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java?rev=1683096r1=1683095r2=1683096view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java Tue 
Jun  2 12:58:37 2015
@@ 

svn commit: r1683114 - in /tomcat/trunk: java/org/apache/coyote/http2/ test/org/apache/coyote/http2/

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 13:44:16 2015
New Revision: 1683114

URL: http://svn.apache.org/r1683114
Log:
More work on the setting up h2c connections
- clients must send a settings frame in the preface (as well as the upgrade)
- refactor readFrame() so an expected type can be specified
- ensure the first frame the server sends is a settings frame
- restore sending the ack for a settings frame

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1683114r1=1683113r2=1683114view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Tue Jun  2 
13:44:16 2015
@@ -72,6 +72,10 @@ class Http2Parser {
  * @throws IOException If an IO error occurs while trying to read a frame
  */
 boolean readFrame(boolean block) throws IOException {
+return readFrame(block, null);
+}
+
+private boolean readFrame(boolean block, Integer expected) throws 
IOException {
 if (!input.fill(block, frameHeaderBuffer)) {
 return false;
 }
@@ -81,6 +85,12 @@ class Http2Parser {
 int flags = ByteUtil.getOneByte(frameHeaderBuffer, 4);
 int streamId = ByteUtil.get31Bits(frameHeaderBuffer, 5);
 
+if (expected != null  frameType != expected.intValue()) {
+throw new 
Http2Exception(sm.getString(http2Parser.processFrame.unexpectedType,
+expected, Integer.toString(frameType)),
+streamId, Http2Exception.PROTOCOL_ERROR);
+}
+
 if (payloadSize  maxPayloadSize) {
 throw new Http2Exception(sm.getString(http2Parser.payloadTooBig,
 Integer.toString(payloadSize), 
Integer.toString(maxPayloadSize)),
@@ -282,15 +292,13 @@ class Http2Parser {
 throw new 
Http2Exception(sm.getString(http2Parser.processFrameSettings.invalidPayloadSize,
 Integer.toString(payloadSize)), 0, 
Http2Exception.FRAME_SIZE_ERROR);
 }
-if (payloadSize  0  (flags  0x1) != 0) {
+boolean ack = (flags  0x1) != 0;
+if (payloadSize  0  ack) {
 throw new 
Http2Exception(sm.getString(http2Parser.processFrameSettings.ackWithNonZeroPayload),
 0, Http2Exception.FRAME_SIZE_ERROR);
 }
 
-if (payloadSize == 0) {
-// Either an ACK or an empty settings frame
-output.settingsEmpty((flags  0x1) != 0);
-} else {
+if (payloadSize != 0) {
 // Process the settings
 byte[] setting = new byte[6];
 for (int i = 0; i  payloadSize / 6; i++) {
@@ -300,6 +308,7 @@ class Http2Parser {
 output.setting(id, value);
 }
 }
+output.settingsEnd(ack);
 }
 
 
@@ -389,7 +398,7 @@ class Http2Parser {
  *
  * @return codetrue/code if a valid preface was read, otherwise false.
  */
-boolean readConnectionPreface() {
+boolean readConnectionPreface() throws IOException {
 if (readPreface) {
 return true;
 }
@@ -414,6 +423,9 @@ class Http2Parser {
 }
 }
 
+// Must always be followed by a settings frame
+readFrame(true, Integer.valueOf(FRAME_TYPE_SETTINGS));
+
 readPreface = true;
 return true;
 }
@@ -480,8 +492,8 @@ class Http2Parser {
 void headersEnd(int streamId);
 
 // Settings frames
-void settingsEmpty(boolean ack);
 void setting(int identifier, long value) throws IOException;
+void settingsEnd(boolean ack) throws IOException;
 
 // Ping frames
 void pingReceive(byte[] payload) throws IOException;

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=1683114r1=1683113r2=1683114view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Tue Jun  
2 13:44:16 2015
@@ -91,6 +91,7 @@ public class Http2UpgradeHandler extends
 private static final byte[] PING_ACK = { 0x00, 0x00, 0x08, 0x06, 0x01, 
0x00, 0x00, 0x00, 0x00 };
 
 private static final byte[] 

[Bug 57990] While starting Tomcat8 getting error ExecutionException: org.apache.catalina.LifecycleException: Failed to start component

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57990

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Mark Thomas ma...@apache.org ---
Nothing in this bug report indicates a Tomcat bug. Please follow up on the
users mailing list.

-- 
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: r1683085 - in /tomcat/trunk: java/org/apache/coyote/http2/ test/org/apache/coyote/http2/

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 12:39:39 2015
New Revision: 1683085

URL: http://svn.apache.org/r1683085
Log:
Expand testing of section 3.2.1
 - Refactor Http2Parser.Output for empty settings to enable explicit testing
   for empty settings frames from the server
 - Refactor tests to reduce code required for 'standard' values and to expand
   options for adding non-standard values
 - Add a test for zero HTTP2-Settings headers
 

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1683085r1=1683084r2=1683085view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Tue Jun  2 
12:39:39 2015
@@ -289,9 +289,7 @@ class Http2Parser {
 
 if (payloadSize == 0) {
 // Either an ACK or an empty settings frame
-if ((flags  0x1) != 0) {
-output.settingsAck();
-}
+output.settingsEmpty((flags  0x1) != 0);
 } else {
 // Process the settings
 byte[] setting = new byte[6];
@@ -482,7 +480,7 @@ class Http2Parser {
 void headersEnd(int streamId);
 
 // Settings frames
-void settingsAck();
+void settingsEmpty(boolean ack);
 void setting(int identifier, long value) throws IOException;
 
 // Ping frames

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=1683085r1=1683084r2=1683085view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Tue Jun  
2 12:39:39 2015
@@ -751,8 +751,10 @@ public class Http2UpgradeHandler extends
 
 
 @Override
-public void settingsAck() {
-// TODO Auto-generated method stub
+public void settingsEmpty(boolean ack) {
+if (ack) {
+// TODO Process ACK
+}
 }
 
 

Modified: tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java?rev=1683085r1=1683084r2=1683085view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java Tue Jun  2 
12:39:39 2015
@@ -22,6 +22,7 @@ import java.io.OutputStream;
 import java.net.Socket;
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
+import java.util.Locale;
 
 import javax.net.SocketFactory;
 import javax.servlet.ServletException;
@@ -48,11 +49,11 @@ import org.apache.tomcat.util.codec.bina
  */
 public abstract class Http2TestBase extends TomcatBaseTest {
 
-private static final String HTTP2_SETTINGS;
+static final String EMPTY_HTTP2_SETTINGS;
 
 static {
 byte[] empty = new byte[0];
-HTTP2_SETTINGS = Base64.encodeBase64String(empty);
+EMPTY_HTTP2_SETTINGS = HTTP2-Settings:  + 
Base64.encodeBase64String(empty) + \r\n;
 }
 
 private Socket s;
@@ -70,14 +71,15 @@ public abstract class Http2TestBase exte
 enableHttp2();
 configureAndStartWebApplication();
 openClientConnection();
-doHttpUpgrade(h2c, true);
+doHttpUpgrade();
 sendClientPreface();
 // Need to read 3 frames (settings, headers and response body)
 parser.readFrame(true);
 parser.readFrame(true);
 parser.readFrame(true);
 
-Assert.assertEquals(1-HeadersStart\n +
+Assert.assertEquals(0-Settings-Empty\n +
+1-HeadersStart\n +
 1-Header-[:status]-[200]\n +
 1-HeadersEnd\n +
 1-Body-8192\n +
@@ -122,12 +124,17 @@ public abstract class Http2TestBase exte
 }
 
 
-protected void doHttpUpgrade(String upgrade, boolean validate) throws 
IOException {
+protected void doHttpUpgrade() throws IOException {
+doHttpUpgrade(h2c, EMPTY_HTTP2_SETTINGS, true);
+}
+
+protected void doHttpUpgrade(String upgrade, String settings, boolean 
validate)
+throws IOException {
 byte[] upgradeRequest = (GET / HTTP/1.1\r\n +
 Host: localhost: + getPort() + \r\n 

[Bug 57990] New: While starting Tomcat8 getting error ExecutionException: org.apache.catalina.LifecycleException: Failed to start component

2015-06-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57990

Bug ID: 57990
   Summary: While starting Tomcat8 getting error
ExecutionException:
org.apache.catalina.LifecycleException: Failed to
start component
   Product: Tomcat 8
   Version: 8.0.22
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: deep@gmail.com

Hi,

This issue is not reproducible in every linux machine but in few machine while
starting application with tomcat it is giving below error:

java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/nps]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/nps]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2472)
at
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)


Previously I was using tomcat7 and now updated to tomcat8 and this issue
started comming. Please check

-- 
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



buildbot exception in ASF Buildbot on tomcat-trunk

2015-06-02 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/1309

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] 1683114
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in ASF Buildbot on tomcat-trunk

2015-06-02 Thread buildbot
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/1308

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] 1683096
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



[GitHub] tomcat pull request: Update service.bat

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/3


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] tomcat pull request: Create manifest.yml

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/9


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] tomcat pull request: now json is fashion

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/15


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] tomcat pull request: Fix https://issues.apache.org/bugzilla/show_b...

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/10


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] tomcat pull request: Recursively create document base directory

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/20


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] tomcat pull request: Document the use of shutdown and port att...

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/6


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [GitHub] tomcat pull request: Document the use of shutdown and port att...

2015-06-02 Thread Mark Thomas
On 02/06/2015 17:17, asfgit wrote:
 Github user asfgit closed the pull request at:
 
 https://github.com/apache/tomcat/pull/6

For those of you wondering who closed these / how there were closed it
was me.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] tomcat pull request: Split AccessLogValve and extract the formatti...

2015-06-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tomcat/pull/2


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1683141 - in /tomcat/trunk: java/org/apache/coyote/http11/ java/org/apache/coyote/http2/ test/org/apache/coyote/http2/

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 17:06:40 2015
New Revision: 1683141

URL: http://svn.apache.org/r1683141
Log:
More tests for RFC7540 section 3.2.1
- Ensure HTTP2-Settings appears in the Connection header
- Support the connection header being split across multiple headers
- Refactor the tests to allow custom Connection headers to be injected

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java
tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2.java
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1683141r1=1683140r2=1683141view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Tue Jun  2 
17:06:40 2015
@@ -19,6 +19,7 @@ package org.apache.coyote.http11;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.nio.ByteBuffer;
+import java.util.Enumeration;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -1028,8 +1029,14 @@ public class Http11Processor extends Abs
 }
 
 // Has an upgrade been requested?
-String connection = request.getHeader(Constants.CONNECTION);
-if (connection != null  
connection.toLowerCase().contains(upgrade)) {
+EnumerationString connectionValues = 
request.getMimeHeaders().values(Connection);
+boolean foundUpgrade = false;
+while (connectionValues.hasMoreElements()  !foundUpgrade) {
+foundUpgrade = connectionValues.nextElement().toLowerCase(
+Locale.ENGLISH).contains(upgrade);
+}
+
+if (foundUpgrade) {
 // Check the protocol
 String requestedProtocol = request.getHeader(Upgrade);
 

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java?rev=1683141r1=1683140r2=1683141view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java Tue Jun  2 
17:06:40 2015
@@ -81,17 +81,22 @@ public class Http2Protocol implements Up
 @Override
 public boolean accept(Request request) {
 // Should only be one HTTP2-Settings header
-EnumerationString headers = 
request.getMimeHeaders().values(HTTP2-Settings);
+EnumerationString settings = 
request.getMimeHeaders().values(HTTP2-Settings);
 int count = 0;
-while (headers.hasMoreElements()) {
+while (settings.hasMoreElements()) {
 count++;
-headers.nextElement();
+settings.nextElement();
 }
 if (count != 1) {
 return false;
 }
 
-return true;
+EnumerationString connection = 
request.getMimeHeaders().values(Connection);
+boolean found = false;
+while (connection.hasMoreElements()  !found) {
+found = connection.nextElement().contains(HTTP2-Settings);
+}
+return found;
 }
 
 

Modified: tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java?rev=1683141r1=1683140r2=1683141view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http2/Http2TestBase.java Tue Jun  2 
17:06:40 2015
@@ -49,6 +49,7 @@ import org.apache.tomcat.util.codec.bina
  */
 public abstract class Http2TestBase extends TomcatBaseTest {
 
+static final String DEFAULT_CONNECTION_HEADER_VALUE = Upgrade, 
HTTP2-Settings;
 private static final byte[] EMPTY_SETTINGS_FRAME =
 { 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 };
 static final String EMPTY_HTTP2_SETTINGS_HEADER;
@@ -75,6 +76,10 @@ public abstract class Http2TestBase exte
 openClientConnection();
 doHttpUpgrade();
 sendClientPreface();
+validateHttp2InitialResponse();
+}
+
+protected void validateHttp2InitialResponse() throws Exception {
 // - 101 response acts as acknowledgement of the HTTP2-Settings header
 // Need to read 4 frames
 // - settings (server settings - must be first)
@@ -134,14 +139,14 @@ public abstract class Http2TestBase exte
 
 
 protected void 

svn commit: r1683144 - /tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java

2015-06-02 Thread markt
Author: markt
Date: Tue Jun  2 17:17:35 2015
New Revision: 1683144

URL: http://svn.apache.org/r1683144
Log:
Add a note.

Modified:
tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java

Modified: tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java?rev=1683144r1=1683143r2=1683144view=diff
==
--- tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java 
(original)
+++ tomcat/trunk/test/org/apache/coyote/http2/TestHttp2Section_3_2_1.java Tue 
Jun  2 17:17:35 2015
@@ -75,8 +75,7 @@ public class TestHttp2Section_3_2_1 exte
 validateHttp2InitialResponse();
 }
 
-
-// TODO: Test trailing '=' are omitted
-
-// TODO: Test invalid Http2-Settings header (wrong length, invalid 
encoding)
+// No need to test how trailing '=' are handled here. HTTP2Settings 
payloads
+// are always a multiple of 6 long which means valid payloads never end in
+// '='. Invalid payloads will be rejected anyway.
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump]: Project tomcat-trunk-test-nio (in module tomcat-trunk) failed

2015-06-02 Thread Bill Barker
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-trunk-test-nio has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 19 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-nio :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/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-trunk/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 40 mins 47 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.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150602-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150602.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150602-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO -Dtest.accesslog=true -Dexecute.test.nio=true 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-master/dest-20150602/bin/o
 penssl -Dexecute.test.apr=false -Dtest.excludePerformance=true 
-Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-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-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/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-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu
 
ild/lib/tomcat-util.jar