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

2014-06-05 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.
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 8.x, a web server implementing the Java 
Servlet 3.1,
...


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: 24 mins 17 secs
Command Line: /usr/lib/jvm/java-7-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.12-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-20140605-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20140605.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20140605-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO -Dtest.accesslog=true -Dexecute.test.nio=true 
-Dexecute.test.apr=false -Dexecute.test.bio=false -Dexecute.test.n
 io2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/hamcrest-java/build/hamcrest-core-20140605.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-7-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/servle
 
t-api.jar:/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/build/lib/tomcat-spdy.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/public

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

2014-06-05 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.
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 8.x, a web server implementing the Java 
Servlet 3.1,
...


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: 24 mins 57 secs
Command Line: /usr/lib/jvm/java-7-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.12-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-20140605-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20140605.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20140605-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true 
-Dexecute.test.nio=false -Dexecute.test.apr=false -Dexecute.test.bio=false 
-Dexecute.tes
 t.nio2=true 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/hamcrest-java/build/hamcrest-core-20140605.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-7-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/servle
 
t-api.jar:/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/build/lib/tomcat-spdy.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump

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

2014-06-05 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-bio 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-trunk-test-bio :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

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



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-bio/gump_work/build_tomcat-trunk_tomcat-trunk-test-bio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-bio (Type: Build)
Work ended in a state of : Failed
Elapsed: 21 mins 52 secs
Command Line: /usr/lib/jvm/java-7-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.12-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-BIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20140605-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/P20140317-1600/ecj-P20140317-1600.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20140605.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20140605-native-src.tar.gz
 -Dtest.temp=output/test-tmp-BIO -Dtest.accesslog=true -Dexecute.test.nio=false 
-Dexecute.test.apr=false -Dexecute.test.bio=true -Dexecute.test.n
 io2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar
 
-Dhamcrest.jar=/srv/gump/public/workspace/hamcrest/hamcrest-java/build/hamcrest-core-20140605.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-7-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/servle
 
t-api.jar:/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/build/lib/tomcat-spdy.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/public

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

2014-06-05 Thread Mark Thomas
On 05/06/2014 01:36, Bill Barker wrote:
 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 26 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 8.x, a web server implementing the Java 
 Servlet 3.1,

The failures are caused by my recent changes to error handling. The
criteria I am using to determine if there has been an unhandled error
after the response is committed are too broad and the connection is
being terminated when it shouldn't. I'm looking into options to fix this
now.

Mark

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



[Bug 56580] el-api.jar memory leak

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56580

--- Comment #6 from cos...@prodinf.ro ---
I think that I will store in WEB-INF/lib all my jars for now

-- 
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: r1600579 - /tomcat/trunk/java/org/apache/catalina/connector/Response.java

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 10:01:18 2014
New Revision: 1600579

URL: http://svn.apache.org/r1600579
Log:
Update the error count regardless of how the error flag was set
Ensure that an request can only contribute to the error count once

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Response.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1600579r1=1600578r2=1600579view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Thu Jun  5 
10:01:18 2014
@@ -386,7 +386,13 @@ public class Response
  * Set the error flag.
  */
 public void setError() {
-error = true;
+if (!error) {
+error = true;
+Wrapper wrapper = getRequest().getWrapper();
+if (wrapper != null) {
+wrapper.incrementErrorCount();
+}
+}
 }
 
 
@@ -1193,11 +1199,6 @@ public class Response
 return;
 }
 
-Wrapper wrapper = getRequest().getWrapper();
-if (wrapper != null) {
-wrapper.incrementErrorCount();
-}
-
 setError();
 
 coyoteResponse.setStatus(status);



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



svn commit: r1600580 - in /tomcat/trunk/java/org/apache/catalina: connector/Response.java core/StandardWrapperValve.java valves/ErrorReportValve.java

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 10:04:45 2014
New Revision: 1600580

URL: http://svn.apache.org/r1600580
Log:
Fix further regressions in the error handling changes
(r1600449 and r1600495)

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java
tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1600580r1=1600579r2=1600580view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Thu Jun  5 
10:04:45 2014
@@ -198,6 +198,7 @@ public class Response
  * The error flag.
  */
 protected boolean error = false;
+private boolean errorAfterCommit = false;
 
 
 /**
@@ -239,6 +240,7 @@ public class Response
 appCommitted = false;
 included = false;
 error = false;
+errorAfterCommit = false;
 isCharacterEncodingSet = false;
 
 if (Globals.IS_SECURITY_ENABLED || Connector.RECYCLE_FACADES) {
@@ -388,6 +390,7 @@ public class Response
 public void setError() {
 if (!error) {
 error = true;
+errorAfterCommit = coyoteResponse.isCommitted();
 Wrapper wrapper = getRequest().getWrapper();
 if (wrapper != null) {
 wrapper.incrementErrorCount();
@@ -404,6 +407,11 @@ public class Response
 }
 
 
+public boolean isErrorAfterCommit() {
+return errorAfterCommit;
+}
+
+
 /**
  * Perform whatever actions are required to flush and close the output
  * stream or writer, in a single operation.
@@ -1775,7 +1783,4 @@ public class Response
 return (sb.toString());
 
 }
-
-
 }
-

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java?rev=1600580r1=1600579r2=1600580view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java Thu 
Jun  5 10:04:45 2014
@@ -508,7 +508,7 @@ final class StandardWrapperValve
Throwable exception) {
 request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, exception);
 response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-
+response.setError();
 }
 
 public long getProcessingTime() {

Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1600580r1=1600579r2=1600580view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Thu Jun  
5 10:04:45 2014
@@ -78,25 +78,21 @@ public class ErrorReportValve extends Va
 // Perform the request
 getNext().invoke(request, response);
 
-// Check the response for an error
-Throwable throwable = (Throwable) 
request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
-
-if (response.getStatus()  400  throwable == null  
!response.isError() ||
-request.isAsyncDispatching()) {
+if (response.isCommitted()) {
+if (response.isErrorAfterCommit()) {
+// Flush any data that is still to be written to the client
+response.flushBuffer();
+// Close immediately to signal to the client that something 
went
+// wrong
+response.getCoyoteResponse().action(ActionCode.CLOSE_NOW, 
null);
+}
 return;
 }
 
-// If we get this far then there has been an error
+Throwable throwable = (Throwable) 
request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
 
-if (response.isCommitted()) {
-// Flush any data that is still to be written to the client
-response.flushBuffer();
-// Mark the response as in error
-response.setError();
-
response.getCoyoteResponse().setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-// Close immediately to signal to the client that something went
-// wrong
-response.getCoyoteResponse().action(ActionCode.CLOSE_NOW, null);
+if (request.isAsyncStarted()  ((response.getStatus()  400 
+throwable == null) || request.isAsyncDispatching())) {
 

[Bug 56518] NIO async servlet limit latch leak

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

hanyong observer.h...@alibaba-inc.com changed:

   What|Removed |Added

  Attachment #31613|0   |1
is obsolete||

--- Comment #5 from hanyong observer.h...@alibaba-inc.com ---
Created attachment 31690
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=31690action=edit
sample webapp to reproduce the bug in tomcat 8.0.8

-- 
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 56518] NIO async servlet limit latch leak

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

hanyong observer.h...@alibaba-inc.com changed:

   What|Removed |Added

  Attachment #31614|0   |1
is obsolete||

--- Comment #6 from hanyong observer.h...@alibaba-inc.com ---
Created attachment 31691
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=31691action=edit
source code of the sample webapp

-- 
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 56518] NIO async servlet limit latch leak

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #7 from hanyong observer.h...@alibaba-inc.com ---
we are try to back-porting the fix in tomcat 8 to tomcat 7.
After some debugging, It seems the bug does not fixed in tomcat 8, but make it
more difficult to reproduce.
The root cause is that the SelectionKey is removed before the count down be
executed. 

I fixed the sample webapp to set the sleep time a little more than the
selectorTimeout, then I can reproduce the bug in tomcat 8.0.8.

I'm use ubuntu 12.04 32bit, oracle jdk 1.7.0_55, tomcat 8.0.8.

In a tomcat 8.0.8 clean install,
(1) edit server.xml, in the Connector add maxConnections=10 to reproduce
this bug faster.
(2) remove origin ROOT in webapps, 'rm -rf conf/ROOT', deploy the sample webapp
to webapps/ROOT.war.
(3) start tomcat.
(4) make plenty request to /async.html, 

for (( i = 0; i  15000; ++i )) ; do echo $i; curl localhost:8080/async.html;
done

wait a minute, then the curl client hangs, the connection limit will count up
to the max.

-- 
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: r1600607 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

2014-06-05 Thread kkolinko
Author: kkolinko
Date: Thu Jun  5 11:27:30 2014
New Revision: 1600607

URL: http://svn.apache.org/r1600607
Log:
Remove null check, as instanceof condition on the next line takes care of 
nulls.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1600607r1=1600606r2=1600607view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Jun  5 
11:27:30 2014
@@ -4748,8 +4748,6 @@ public class StandardContext extends Con
 getServletContext()));
 }
 for (int i = 0; i  instances.length; i++) {
-if (instances[i] == null)
-continue;
 if (!(instances[i] instanceof ServletContextListener))
 continue;
 ServletContextListener listener =



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



svn commit: r1600616 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java

2014-06-05 Thread kkolinko
Author: kkolinko
Date: Thu Jun  5 11:52:22 2014
New Revision: 1600616

URL: http://svn.apache.org/r1600616
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=55282
Fix message that is displayed when a duplicate listener is added.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1600616r1=1600615r2=1600616view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Thu 
Jun  5 11:52:22 2014
@@ -2865,8 +2865,8 @@ public class StandardContext extends Con
 new ApplicationListener[applicationListeners.length + 1];
 for (int i = 0; i  applicationListeners.length; i++) {
 if (listener.equals(applicationListeners[i])) {
-log.info(sm.getString(
-standardContext.duplicateListener,listener));
+log.info(sm.getString(standardContext.duplicateListener,
+listener.getClassName()));
 return;
 }
 results[i] = applicationListeners[i];



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



svn commit: r1600638 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ test/org/apache/catalina/co

2014-06-05 Thread kkolinko
Author: kkolinko
Date: Thu Jun  5 12:42:13 2014
New Revision: 1600638

URL: http://svn.apache.org/r1600638
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56588
Update according to the changes in Tomcat 8:
Un-deprecate Context.addApplicationListener(String)
Deprecate Context.addApplicationListener(ApplicationListener)

Replace calls to addApplicationListener(new ApplicationListener(x, false)) with 
addApplicationListener(x).

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/TldConfig.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestListener.java

tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELInterpreterFactory.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java?rev=1600638r1=1600637r2=1600638view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/Context.java Thu Jun  5 
12:42:13 2014
@@ -780,11 +780,29 @@ public interface Context extends Contain
 // - Public Methods
 
 /**
- * Add a new Listener class name to the set of Listeners
- * configured for this application.
+ * Add a new Listener class name to the set of Listeners configured for 
this
+ * application.
  *
- * @param listener Java class name of a listener class
+ * p
+ * The {@link ApplicationListener} class is used to pass an additional
+ * parameter that allows to differentiate listeners to Web Application 
added
+ * via configuration (web.xml or annotations) vs. ones added by frameworks,
+ * such as listeners declared in JSP tag libraries (TLD files) that are
+ * added by Jasper JSP Engine.
+ *
+ * p
+ * The recommended method to call for the first use case is
+ * {@link #addApplicationListener(String)}. The recommended replacement for
+ * the second use case is to use {@code addListener(...)} methods in
+ * {@link javax.servlet.ServletContext}.
+ *
+ * @param listener
+ *Definition of a listener, including its java class name.
+ * @deprecated This method is removed from Tomcat 8.0.9 onwards. Use
+ * {@link #addApplicationListener(String)} or
+ * {@link javax.servlet.ServletContext#addListener(String)}.
  */
+@Deprecated
 public void addApplicationListener(ApplicationListener listener);
 
 
@@ -793,10 +811,7 @@ public interface Context extends Contain
  * configured for this application.
  *
  * @param listener Java class name of a listener class
- * 
- * @deprecated Use {@link #addApplicationListener(ApplicationListener)}
  */
-@Deprecated
 public void addApplicationListener(String listener);
 
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1600638r1=1600637r2=1600638view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Thu 
Jun  5 12:42:13 2014
@@ -2849,14 +2849,7 @@ public class StandardContext extends Con
 public void addApplicationListener(String listener) {
 addApplicationListener(new ApplicationListener(listener, false));
 }
-
-
-/**
- * Add a new Listener class name to the set of Listeners
- * configured for this application.
- *
- * @param listener Java class name of a listener class
- */
+
 @Override
 public void addApplicationListener(ApplicationListener listener) {
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java?rev=1600638r1=1600637r2=1600638view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/WebXml.java Thu Jun  5 
12:42:13 2014
@@ -1340,8 +1340,7 @@ public class WebXml {
 descriptor);
 }
 for (String listener 

[Bug 56588] ApplicationListener#pluggabilityBlocked field is always false in Tomcat 8

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56588

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
Ack. I see.
In StandardContext.listenerStart() the listeners that have been already
configured before (via ServletContext API) are added to
'noPluggabilityListeners' set. That does the trick.

I updated deprecation markers on o.a.c.Context methods in Tomcat 7 in r1600638.
It will be in 7.0.55.

-- 
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 55282] JSF PhaseListeners are duplicated

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55282

--- Comment #10 from Konstantin Kolinko knst.koli...@gmail.com ---
(In reply to Volker from comment #8)

I also fixed the error message that was displayed (r1600616 7.0.55).

The addApplicationListener(ApplicationListener) API was reviewed and reverted
in Tomcat 8 - issue 56588.

-- 
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 success in ASF Buildbot on tomcat-7-trunk

2014-06-05 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/93

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1600616
Blamelist: kkolinko

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: r1600645 - in /tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket: ./ pojo/ server/

2014-06-05 Thread kkolinko
Author: kkolinko
Date: Thu Jun  5 13:17:36 2014
New Revision: 1600645

URL: http://svn.apache.org/r1600645
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56588
Followup to r1600638
Replace calls to addApplicationListener(new ApplicationListener(x, false)) with 
addApplicationListener(x).

(I missed them in the first commit, because I have separate Eclipse project 
configured for WebSocket classes in Tomcat 7, as they require a different JDK 
version).

Modified:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1600645r1=1600644r2=1600645view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 Thu Jun  5 13:17:36 2014
@@ -30,7 +30,6 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
-import org.apache.catalina.deploy.ApplicationListener;
 import org.apache.catalina.servlets.DefaultServlet;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
@@ -46,8 +45,7 @@ public class TestWebSocketFrameClient ex
 // Must have a real docBase - just use temp
 Context ctx =
 tomcat.addContext(, System.getProperty(java.io.tmpdir));
-ctx.addApplicationListener(new ApplicationListener(
-TesterFirehoseServer.Config.class.getName(), false));
+
ctx.addApplicationListener(TesterFirehoseServer.Config.class.getName());
 Tomcat.addServlet(ctx, default, new DefaultServlet());
 ctx.addServletMapping(/, default);
 

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java?rev=1600645r1=1600644r2=1600645view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
 Thu Jun  5 13:17:36 2014
@@ -34,7 +34,6 @@ import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
-import org.apache.catalina.deploy.ApplicationListener;
 import org.apache.catalina.servlets.DefaultServlet;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
@@ -53,8 +52,7 @@ public class TestWebSocketFrameClientSSL
 // Must have a real docBase - just use temp
 Context ctx =
 tomcat.addContext(, System.getProperty(java.io.tmpdir));
-ctx.addApplicationListener(new ApplicationListener(
-TesterFirehoseServer.Config.class.getName(), false));
+
ctx.addApplicationListener(TesterFirehoseServer.Config.class.getName());
 Tomcat.addServlet(ctx, default, new DefaultServlet());
 ctx.addServletMapping(/, default);
 
@@ -112,8 +110,7 @@ public class TestWebSocketFrameClientSSL
 // Must have a real docBase - just use temp
 Context ctx =
 tomcat.addContext(, System.getProperty(java.io.tmpdir));
-ctx.addApplicationListener(new ApplicationListener(
-TesterFirehoseServer.Config.class.getName(), false));
+
ctx.addApplicationListener(TesterFirehoseServer.Config.class.getName());
 Tomcat.addServlet(ctx, default, new DefaultServlet());
 ctx.addServletMapping(/, default);
 

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java?rev=1600645r1=1600644r2=1600645view=diff

svn commit: r1600651 - in /tomcat/trunk: java/org/apache/tomcat/websocket/server/LocalStrings.properties java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java webapps/docs/changelog.xml

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 13:29:07 2014
New Revision: 1600651

URL: http://svn.apache.org/r1600651
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
Change the value returned by Session.getRequestURI() from the value obtained 
from HttpServletRequest.getRequestURI() to the value obtained from 
HttpServletRequest.getRequestURI() with the scheme changed to ws or wss as 
appropriate. Note that the WebSocket Expert Group is expected to clarify the 
expected behaviour for Session.getRequestURI() which may result in further 
changes.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties?rev=1600651r1=1600650r2=1600651view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties 
Thu Jun  5 13:29:07 2014
@@ -29,6 +29,8 @@ uriTemplate.emptySegment=The path [{0}] 
 uriTemplate.invalidPath=The path [{0}] is not valid.
 uriTemplate.invalidSegment=The segment [{0}] is not valid in the provided path 
[{1}]
 
+wsHandshakeRequest.unknownScheme=The scheme [{0}] is not recognised. [http] or 
[https] is expected
+
 wsHttpUpgradeHandler.destroyFailed=Failed to close WebConnection while 
destroying the WebSocket HttpUpgradeHandler
 wsHttpUpgradeHandler.noPreInit=The preInit() method must be called to 
configure the WebSocket HttpUpgradeHandler before the container calls init(). 
Usually, this means the Servlet that created the WsHttpUpgradeHandler instance 
should also call preInit()
 

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java?rev=1600651r1=1600650r2=1600651view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 
Thu Jun  5 13:29:07 2014
@@ -30,11 +30,15 @@ import java.util.Map.Entry;
 import javax.servlet.http.HttpServletRequest;
 import javax.websocket.server.HandshakeRequest;
 
+import org.apache.tomcat.util.res.StringManager;
+
 /**
  * Represents the request that this session was opened under.
  */
 public class WsHandshakeRequest implements HandshakeRequest {
 
+private static final StringManager sm = 
StringManager.getManager(Constants.PACKAGE_NAME);
+
 private final URI requestUri;
 private final MapString,ListString parameterMap;
 private final String queryString;
@@ -54,11 +58,29 @@ public class WsHandshakeRequest implemen
 httpSession = request.getSession(false);
 
 // URI
-StringBuilder sb = new StringBuilder(request.getRequestURI());
-if (queryString != null) {
-sb.append(?);
-sb.append(queryString);
+// Based on request.getRequestURL() implementation
+StringBuilder sb = new StringBuilder();
+String scheme = request.getScheme();
+int port = request.getServerPort();
+if (port  0)
+port = 80; // Work around java.net.URL bug
+
+if (scheme.equals(http)) {
+sb.append(ws);
+} else if (scheme.equals(https)) {
+sb.append(wss);
+} else {
+throw new IllegalArgumentException(
+sm.getString(wsHandshakeRequest.unknownScheme, scheme));
+}
+sb.append(://);
+sb.append(request.getServerName());
+if ((scheme.equals(http)  (port != 80))
+|| (scheme.equals(https)  (port != 443))) {
+sb.append(':');
+sb.append(port);
 }
+sb.append(request.getRequestURI());
 try {
 requestUri = new URI(sb.toString());
 } catch (URISyntaxException e) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1600651r1=1600650r2=1600651view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jun  5 13:29:07 2014
@@ -198,6 +198,16 @@
   fix
 Add more varied endpoints for echo testing. (remm)
   /fix
+  fix
+bug56573/bug: Change the value returned by
+codeSession.getRequestURI()/code from the value obtained from
+codeHttpServletRequest.getRequestURI()/code to 

svn commit: r1600653 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/server/LocalStrings.properties java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java webapps/docs/changel

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 13:34:39 2014
New Revision: 1600653

URL: http://svn.apache.org/r1600653
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
Change the value returned by Session.getRequestURI() from the value obtained 
from HttpServletRequest.getRequestURI() to the value obtained from 
HttpServletRequest.getRequestURI() with the scheme changed to ws or wss as 
appropriate. Note that the WebSocket Expert Group is expected to clarify the 
expected behaviour for Session.getRequestURI() which may result in further 
changes.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1600651

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties?rev=1600653r1=1600652r2=1600653view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
 Thu Jun  5 13:34:39 2014
@@ -31,6 +31,8 @@ uriTemplate.emptySegment=The path [{0}] 
 uriTemplate.invalidPath=The path [{0}] is not valid.
 uriTemplate.invalidSegment=The segment [{0}] is not valid in the provided path 
[{1}]
 
+wsHandshakeRequest.unknownScheme=The scheme [{0}] is not recognised. [http] or 
[https] is expected
+
 wsHttpUpgradeHandler.destroyFailed=Failed to close WebConnection while 
destroying the WebSocket HttpUpgradeHandler
 wsHttpUpgradeHandler.noPreInit=The preInit() method must be called to 
configure the WebSocket HttpUpgradeHandler before the container calls init(). 
Usually, this means the Servlet that created the WsHttpUpgradeHandler instance 
should also call preInit()
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java?rev=1600653r1=1600652r2=1600653view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
 Thu Jun  5 13:34:39 2014
@@ -30,11 +30,15 @@ import java.util.Map.Entry;
 import javax.servlet.http.HttpServletRequest;
 import javax.websocket.server.HandshakeRequest;
 
+import org.apache.tomcat.util.res.StringManager;
+
 /**
  * Represents the request that this session was opened under.
  */
 public class WsHandshakeRequest implements HandshakeRequest {
 
+private static final StringManager sm = 
StringManager.getManager(Constants.PACKAGE_NAME);
+
 private final URI requestUri;
 private final MapString,ListString parameterMap;
 private final String queryString;
@@ -54,11 +58,29 @@ public class WsHandshakeRequest implemen
 httpSession = request.getSession(false);
 
 // URI
-StringBuilder sb = new StringBuilder(request.getRequestURI());
-if (queryString != null) {
-sb.append(?);
-sb.append(queryString);
+// Based on request.getRequestURL() implementation
+StringBuilder sb = new StringBuilder();
+String scheme = request.getScheme();
+int port = request.getServerPort();
+if (port  0)
+port = 80; // Work around java.net.URL bug
+
+if (scheme.equals(http)) {
+sb.append(ws);
+} else if (scheme.equals(https)) {
+sb.append(wss);
+} else {
+throw new IllegalArgumentException(
+sm.getString(wsHandshakeRequest.unknownScheme, scheme));
+}
+sb.append(://);
+sb.append(request.getServerName());
+if ((scheme.equals(http)  (port != 80))
+|| (scheme.equals(https)  (port != 443))) {
+sb.append(':');
+sb.append(port);
 }
+sb.append(request.getRequestURI());
 try {
 requestUri = new URI(sb.toString());
 } catch (URISyntaxException e) {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1600653r1=1600652r2=1600653view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jun 

[Bug 56573] [Spec?] Session.getRequestURI() doesn't return the protocol, port etc.

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56573

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

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Mark Thomas ma...@apache.org ---
I've switched this to the full uncoded path minus the query string (i.e. the
result of HttpServletRequest.getRequestURL()) but with ws/wss as the scheme
rather than http/https. Note that this might change again once/if the EG issues
some clarification.

This has been fixed in 8.0.x for 8.0.9 onwards and in 7.0.x for 7.0.55

-- 
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 56573] [Spec?] Session.getRequestURI() doesn't return the protocol, port etc.

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56573

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com ---
HttpServletRequest.getRequestURI():
http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getRequestURI%28%29

Session.getRequestURI()
http://docs.oracle.com/javaee/7/api/javax/websocket/Session.html#getRequestURI%28%29

The WebSocket method is clearly documented to include a query string (as
opposed to HttpServletRequest method). It also returns an URI, not a String.
These are different methods.

Personally, it is not clear to me from WebSocket documentation whether this
method includes a contextPath, not saying about protocol, server name and port.
It is also not clear whether it is decoded or non-decoded path (see Servlet
API method), but as it is an URI maybe it does not matter.

-- 
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 56573] [Spec?] Session.getRequestURI() doesn't return the protocol, port etc.

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56573

--- Comment #5 from Mark Thomas ma...@apache.org ---
(In reply to Konstantin Kolinko from comment #4)
 The WebSocket method is clearly documented to include a query string

I went looking for that and couldn't find it. I'll add the query string back
in.

-- 
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: r1600653 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/server/LocalStrings.properties java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java webapps/docs/cha

2014-06-05 Thread Konstantin Kolinko
2014-06-05 17:34 GMT+04:00  ma...@apache.org:
 Author: markt
 Date: Thu Jun  5 13:34:39 2014
 New Revision: 1600653

 URL: http://svn.apache.org/r1600653
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
 Change the value returned by Session.getRequestURI() from the value obtained 
 from HttpServletRequest.getRequestURI() to the value obtained from 
 HttpServletRequest.getRequestURI() with the scheme changed to ws or wss as 
 appropriate. Note that the WebSocket Expert Group is expected to clarify the 
 expected behaviour for Session.getRequestURI() which may result in further 
 changes.

 Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 
 tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
 
 tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml


1. The WebSocket API javadoc explicitly says that query string must be
included in the result.
(I added a comment to BZ issue with a link).

 +// Based on request.getRequestURL() implementation
 +StringBuilder sb = new StringBuilder();
 +String scheme = request.getScheme();
 +int port = request.getServerPort();
 +if (port  0)
 +port = 80; // Work around java.net.URL bug
 +
 +if (scheme.equals(http)) {
 +sb.append(ws);
 +} else if (scheme.equals(https)) {
 +sb.append(wss);
 +} else {
 +throw new IllegalArgumentException(
 +sm.getString(wsHandshakeRequest.unknownScheme, 
 scheme));

2. I think  sb.append(scheme); would be better here.
Do we really need to throw IAE here?

 +}
 +sb.append(://);
 +sb.append(request.getServerName());
 +if ((scheme.equals(http)  (port != 80))
 +|| (scheme.equals(https)  (port != 443))) {

3. If 2. above is fixed, this condition shall be updated to uspport
unknown schemas.

if (! ((scheme.equals(http)  (port == 80))
|| (scheme.equals(https)  (port == 443)) ) ) {

 +sb.append(':');
 +sb.append(port);
  }
 +sb.append(request.getRequestURI());
  try {
  requestUri = new URI(sb.toString());
  } catch (URISyntaxException e) {


Best regards,
Konstantin Kolinko

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



svn commit: r1600663 - in /tomcat/trunk: java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/server/ webapps/docs/

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 13:58:00 2014
New Revision: 1600663

URL: http://svn.apache.org/r1600663
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
Restore query string.
Add test cases.

Added:

tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java
   (with props)
tomcat/trunk/test/org/apache/tomcat/websocket/server/TesterUriServer.java   
(with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java?rev=1600663r1=1600662r2=1600663view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 
Thu Jun  5 13:58:00 2014
@@ -81,6 +81,11 @@ public class WsHandshakeRequest implemen
 sb.append(port);
 }
 sb.append(request.getRequestURI());
+if (queryString != null) {
+sb.append('?');
+sb.append(queryString);
+}
+
 try {
 requestUri = new URI(sb.toString());
 } catch (URISyntaxException e) {

Added: 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java?rev=1600663view=auto
==
--- 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java
 (added)
+++ 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java
 Thu Jun  5 13:58:00 2014
@@ -0,0 +1,89 @@
+/*
+ * 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.tomcat.websocket.server;
+
+import java.net.URI;
+import java.util.Queue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.websocket.ClientEndpointConfig;
+import javax.websocket.ContainerProvider;
+import javax.websocket.Session;
+import javax.websocket.WebSocketContainer;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.servlets.DefaultServlet;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.websocket.TesterMessageCountClient.BasicText;
+import 
org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint;
+
+public class TestWsHandshakeRequest extends TomcatBaseTest {
+
+@Test
+public void doTestgetRequestUriWithQueryString() throws Exception {
+doTestgetRequestUri(true);
+}
+
+@Test
+public void doTestgetRequestUriWithoutQueryString() throws Exception {
+doTestgetRequestUri(false);
+}
+
+public void doTestgetRequestUri(boolean withQueryString) throws Exception {
+
+Tomcat tomcat = getTomcatInstance();
+// Must have a real docBase - just use temp
+Context ctx = tomcat.addContext(, 
System.getProperty(java.io.tmpdir));
+ctx.addApplicationListener(TesterUriServer.Config.class.getName());
+Tomcat.addServlet(ctx, default, new DefaultServlet());
+ctx.addServletMapping(/, default);
+
+tomcat.start();
+
+WebSocketContainer wsContainer = 
ContainerProvider.getWebSocketContainer();
+ClientEndpointConfig clientEndpointConfig = 
ClientEndpointConfig.Builder.create().build();
+String target = ws://localhost: + getPort() + TesterUriServer.PATH;
+if (withQueryString) {
+target += ?a=b;
+}
+URI uri = new URI(target);
+Session wsSession = 
wsContainer.connectToServer(TesterProgrammaticEndpoint.class,
+clientEndpointConfig, uri);
+
+CountDownLatch latch = new CountDownLatch(1);
+BasicText handler = new BasicText(latch);
+

[Bug 56573] [Spec?] Session.getRequestURI() doesn't return the protocol, port etc.

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56573

--- Comment #6 from Mark Thomas ma...@apache.org ---
Done.

-- 
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 56586] initSQL should be committed if defaultAutoCommit == false

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56586

--- Comment #2 from Craig Servin cser...@cromagnon.com ---
I am using postgresql and the problem originally showed up when the initSQL was
executing a set search_path and a rollback was triggered by the first
transaction.  To test/recreate the issue I did trigger the same problem with
DML( an insert into a temp table, which then is rolled back).

I was able to fix the issue in my case by adding a ;commit to the end of my
actual initSQL, although this makes me nervous since you are supposed to use
the Connections commit() method when using JDBC.

That solution seamed a little bit hackish to me so I posted this ticket.

-- 
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: r1600665 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/server/ webapps/docs/

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 13:58:49 2014
New Revision: 1600665

URL: http://svn.apache.org/r1600665
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
Restore query string.
Add test cases.

Added:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java
  - copied unchanged from r1600663, 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TesterUriServer.java
  - copied unchanged from r1600663, 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TesterUriServer.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1600663

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java?rev=1600665r1=1600664r2=1600665view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
 Thu Jun  5 13:58:49 2014
@@ -81,6 +81,11 @@ public class WsHandshakeRequest implemen
 sb.append(port);
 }
 sb.append(request.getRequestURI());
+if (queryString != null) {
+sb.append('?');
+sb.append(queryString);
+}
+
 try {
 requestUri = new URI(sb.toString());
 } catch (URISyntaxException e) {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1600665r1=1600664r2=1600665view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jun  5 13:58:49 2014
@@ -111,12 +111,12 @@
   fix
 bug56573/bug: Change the value returned by
 codeSession.getRequestURI()/code from the value obtained from
-codeHttpServletRequest.getRequestURI()/code to the value obtained
-from codeHttpServletRequest.getRequestURI()/code with the scheme
-changed to ws or wss as appropriate. Note that the WebSocket Expert
-Group is expected to clarify the expected behaviour for
-codeSession.getRequestURI()/code which may result in further
-changes. (markt)
+codeHttpServletRequest.getRequestURI()/code plus query string to 
the
+value obtained from codeHttpServletRequest.getRequestURI()/code 
plus
+query string with the scheme changed to ws or wss as appropriate. Note
+that the WebSocket Expert Group is expected to clarify the expected
+behaviour for codeSession.getRequestURI()/code which may result in
+further changes. (markt)
   /fix
 /changelog
   /subsection



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



Re: svn commit: r1600653 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/server/LocalStrings.properties java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java webapps/docs/cha

2014-06-05 Thread Mark Thomas
On 05/06/2014 14:51, Konstantin Kolinko wrote:
 2014-06-05 17:34 GMT+04:00  ma...@apache.org:
 Author: markt
 Date: Thu Jun  5 13:34:39 2014
 New Revision: 1600653

 URL: http://svn.apache.org/r1600653
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
 Change the value returned by Session.getRequestURI() from the value obtained 
 from HttpServletRequest.getRequestURI() to the value obtained from 
 HttpServletRequest.getRequestURI() with the scheme changed to ws or wss as 
 appropriate. Note that the WebSocket Expert Group is expected to clarify the 
 expected behaviour for Session.getRequestURI() which may result in further 
 changes.

 Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 
 tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
 
 tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

 
 1. The WebSocket API javadoc explicitly says that query string must be
 included in the result.
 (I added a comment to BZ issue with a link).
 
 +// Based on request.getRequestURL() implementation
 +StringBuilder sb = new StringBuilder();
 +String scheme = request.getScheme();
 +int port = request.getServerPort();
 +if (port  0)
 +port = 80; // Work around java.net.URL bug
 +
 +if (scheme.equals(http)) {
 +sb.append(ws);
 +} else if (scheme.equals(https)) {
 +sb.append(wss);
 +} else {
 +throw new IllegalArgumentException(
 +sm.getString(wsHandshakeRequest.unknownScheme, 
 scheme));
 
 2. I think  sb.append(scheme); would be better here.
 Do we really need to throw IAE here?

Yes. It should only be possible for the scheme to be http or https so if
it is anything else something has gone very wrong.

Mark

 +}
 +sb.append(://);
 +sb.append(request.getServerName());
 +if ((scheme.equals(http)  (port != 80))
 +|| (scheme.equals(https)  (port != 443))) {
 
 3. If 2. above is fixed, this condition shall be updated to uspport
 unknown schemas.
 
 if (! ((scheme.equals(http)  (port == 80))
 || (scheme.equals(https)  (port == 443)) ) ) {
 
 +sb.append(':');
 +sb.append(port);
  }
 +sb.append(request.getRequestURI());
  try {
  requestUri = new URI(sb.toString());
  } catch (URISyntaxException e) {

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


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



svn commit: r1600669 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

2014-06-05 Thread kkolinko
Author: kkolinko
Date: Thu Jun  5 14:13:28 2014
New Revision: 1600669

URL: http://svn.apache.org/r1600669
Log:
Suppress an IDE warning. No functional change.

Modified:

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1600669r1=1600668r2=1600669view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
Thu Jun  5 14:13:28 2014
@@ -547,6 +547,7 @@ public class WsWebSocketContainer
  * @throws DeploymentException
  * @throws TimeoutException
  */
+@SuppressWarnings(null) // line is not null in line.endsWith() call
 private HandshakeResponse processResponse(ByteBuffer response,
 AsyncChannelWrapper channel, long timeout) throws 
InterruptedException,
 ExecutionException, DeploymentException, EOFException,



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



svn commit: r1600671 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java

2014-06-05 Thread kkolinko
Author: kkolinko
Date: Thu Jun  5 14:16:34 2014
New Revision: 1600671

URL: http://svn.apache.org/r1600671
Log:
Remove unused code from a test class.

Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java?rev=1600671r1=1600670r2=1600671view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java 
Thu Jun  5 14:16:34 2014
@@ -466,23 +466,16 @@ public class TestWebSocket extends Tomca
  */
 private class CustomReader {
 private InputStream is;
-private String encoding;
 private boolean markSupported;
 private B2CConverter b2c;
 
 public CustomReader(InputStream is, String encoding) throws 
IOException {
 this.is = new BufferedInputStream(is);
-this.encoding = encoding;
 markSupported = is.markSupported();
 b2c = new B2CConverter(encoding);
 }
 
-public String getEncoding() {
-return encoding;
-}
-
 public void setEncoding(String encoding) throws IOException {
-this.encoding = encoding;
 b2c = new B2CConverter(encoding);
 }
 
@@ -506,7 +499,6 @@ public class TestWebSocket extends Tomca
 public String readLine() throws IOException {
 ByteChunk bc = new ByteChunk(125);
 CharChunk cc = new CharChunk(125);
-char c;
 int i = is.read();
 int read = 0;
 while (i != -1) {



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



[Bug 56568] Incompatible change in JSPs only permit GET POST or HEAD

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

--- Comment #4 from Mark Thomas ma...@apache.org ---
I'm leaning towards 5. but remain tempted by 1.

-- 
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 56568] Incompatible change in JSPs only permit GET POST or HEAD

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

--- Comment #5 from Konstantin Kolinko knst.koli...@gmail.com ---
The 5. means a JSP page that is served with
ServletRequest.getDispatcherType() == DispatcherType.ERROR ?

There is also an option to interpret that as %@page isErrorPage=true%.

-- 
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 56581] When an error occurs on a long JSP page, do not loose last chunk of printed text

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56581

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com ---
For reference:
Current Error handling thread on dev@
http://tomcat.markmail.org/thread/znillhttbmvsl5e5

-- 
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 56581] When an error occurs on a long JSP page, do not loose last chunk of printed text

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56581

--- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com ---
As a note:
The error handling changes in trunk (r1600449 and follow-ups) have not fixed
this issue. The behaviour is the same as earlier - the output is truncated at
970 .

Tested with trunk @1600674.

-- 
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 56568] Incompatible change in JSPs only permit GET POST or HEAD

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

--- Comment #6 from Mark Thomas ma...@apache.org ---
(In reply to Konstantin Kolinko from comment #5)
 The 5. means a JSP page that is served with
 ServletRequest.getDispatcherType() == DispatcherType.ERROR ?

This looks to be the easiest solution.

Mark

-- 
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 56586] initSQL should be committed if defaultAutoCommit == false

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56586

--- Comment #3 from Christopher Schultz ch...@christopherschultz.net ---
Honestly, I'm surprised that SET search_path [..] will be affected by a
rollback.

I know it's no basis for comparison, but MySQL does not appear to behave this
way:

mysql begin;
Query OK, 0 rows affected (0.01 sec)

mysql set @foo := 'bar';
Query OK, 0 rows affected (0.00 sec)

mysql select @foo;
+--+
| @foo |
+--+
| bar  |
+--+
1 row in set (0.00 sec)

mysql rollback;
Query OK, 0 rows affected (0.00 sec)

mysql select @foo;
+--+
| @foo |
+--+
| bar  |
+--+
1 row in set (0.00 sec)


I think this should be an /option/ that defaults to false because it will
execute another query (COMMIT) on the server side. If most clients do not need
it, there's no need to execute a COMMIT unless the application absolutely needs
it.

Any objections to an option rather than strict behavior?

-- 
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 56586] initSQL should be committed if defaultAutoCommit == false

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56586

--- Comment #4 from Craig Servin cser...@cromagnon.com ---
It just seems like the connection initialization should persist for the life of
the connection.  If I have some DML that initializes a connection, and it is
returned to the pool, when I use that connection again it should still be
initialized.  In this case it wasn't, and it became apparent when the wrong
data was returned.

Adding the ;commit worked as a solution for me it was just interesting to
track down because I expected the initSQL to be permanent for the life of the
connection.

Since different people will have different initSQL commiting the initSQL seems
correct to me, but I have know idea what most people would expect.

No objection to option, default, or leave it as is.  I just wanted to let
people know what I found.

-- 
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: r1600679 - in /tomcat/trunk/test: org/apache/jasper/servlet/TestJspServlet.java webapp/WEB-INF/jsp/error.jsp

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 15:20:35 2014
New Revision: 1600679

URL: http://svn.apache.org/r1600679
Log:
Add a test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

Added:
tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java   (with 
props)
tomcat/trunk/test/webapp/WEB-INF/jsp/error.jsp   (with props)

Added: tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java?rev=1600679view=auto
==
--- tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java (added)
+++ tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java Thu Jun  5 
15:20:35 2014
@@ -0,0 +1,83 @@
+/*
+ * 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.jasper.servlet;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.buf.ByteChunk;
+import org.apache.tomcat.util.descriptor.web.ErrorPage;
+
+public class TestJspServlet  extends TomcatBaseTest {
+
+@Test
+@Ignore
+public void testBug56568() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// Use the test web application so JSP support is available and the
+// default JSP error page can be used.
+File appDir = new File(test/webapp);
+Context context = tomcat.addWebapp(null, /test, 
appDir.getAbsolutePath());
+
+// Create a servlet that always throws an exception for a PUT request
+Tomcat.addServlet(context, Bug56568Servlet, new Bug56568Servlet());
+context.addServletMapping(/bug56568, Bug56568Servlet);
+
+// Configure a JSP page to handle the 500 error response
+// The JSP page will see the same method as the original request (PUT)
+// PUT requests are normally blocked for JSPs
+ErrorPage ep = new ErrorPage();
+ep.setErrorCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+// Note this location doesn't actually exist
+ep.setLocation(/WEB-INF/jsp/error.jsp);
+context.addErrorPage(ep);
+
+tomcat.start();
+
+int rc = methodUrl(http://localhost:; + getPort() + /test/bug56568,
+new ByteChunk(), 5000, null, null, PUT);
+
+// Make sure we get the original 500 response and not a 405 response
+// which would indicate that error.jsp is complaining about being 
called
+// with the PUT method.
+Assert.assertEquals(500, rc);
+}
+
+private static class Bug56568Servlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doPut(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+throw new ServletException();
+}
+}
+}

Propchange: tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java
--
svn:eol-style = native

Added: tomcat/trunk/test/webapp/WEB-INF/jsp/error.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/WEB-INF/jsp/error.jsp?rev=1600679view=auto
==
--- tomcat/trunk/test/webapp/WEB-INF/jsp/error.jsp (added)
+++ tomcat/trunk/test/webapp/WEB-INF/jsp/error.jsp Thu Jun  5 15:20:35 2014
@@ -0,0 +1,22 @@
+%--
+ 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 

[Bug 56568] Incompatible change in JSPs only permit GET POST or HEAD

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

--- Comment #7 from Konstantin Kolinko knst.koli...@gmail.com ---
(In reply to Mark Thomas from comment #6)

OK.
Maybe also allow for DispatcherType.INCLUDE ?

If I remember correctly, Spring (as an example of an MVC framework) allows to
switch view rendering from one using forward to one using include with a single
boolean option. If it is an INCLUDE it means that the request has already been
handled somehow, so it is likely safe for the JSP page to handle 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



svn commit: r1600680 - in /tomcat/trunk: java/org/apache/jasper/servlet/JspServlet.java test/org/apache/jasper/servlet/TestJspServlet.java webapps/docs/changelog.xml

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 15:27:16 2014
New Revision: 1600680

URL: http://svn.apache.org/r1600680
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56568
Allow JSP error pages to handle any HTTP method

Modified:
tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1600680r1=1600679r2=1600680view=diff
==
--- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Thu Jun  5 
15:27:16 2014
@@ -25,6 +25,7 @@ import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 
+import javax.servlet.DispatcherType;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
@@ -283,8 +284,8 @@ public class JspServlet extends HttpServ
 
 String method = request.getMethod();
 
-if (!GET.equals(method)  !POST.equals(method) 
-!HEAD.equals(method)) {
+if (!GET.equals(method)  !POST.equals(method)  
!HEAD.equals(method) 
+!DispatcherType.ERROR.equals(request.getDispatcherType())) {
 // Specification states behaviour is undefined
 // Jasper opts to reject any other verbs, partly as they are
 // unlikely to make sense in a JSP context and partly to protect

Modified: tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java?rev=1600680r1=1600679r2=1600680view=diff
==
--- tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java (original)
+++ tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java Thu Jun  5 
15:27:16 2014
@@ -25,7 +25,6 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 
 import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -37,7 +36,6 @@ import org.apache.tomcat.util.descriptor
 public class TestJspServlet  extends TomcatBaseTest {
 
 @Test
-@Ignore
 public void testBug56568() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1600680r1=1600679r2=1600680view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jun  5 15:27:16 2014
@@ -181,6 +181,10 @@
 Correct a copy/paste error and return a 500 response rather than a 400
 response when an internal server error occurs. (markt)
   /fix
+  fix
+bug56568/bug: Allow any HTTP method when a JSP is being used as an
+error page. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=WebSocket



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



[Bug 56568] Incompatible change in JSPs only permit GET POST or HEAD

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

--- Comment #8 from Mark Thomas ma...@apache.org ---
This specific issue (JSPs and error pages) has been fixed in 8.0.x for 8.0.9
onwards. The broader problem is still with the JSP EG.

-- 
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 56568] Incompatible change in JSPs only permit GET POST or HEAD

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56568

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Mark Thomas ma...@apache.org ---
(In reply to Konstantin Kolinko from comment #7)
 (In reply to Mark Thomas from comment #6)
 
 OK.
 Maybe also allow for DispatcherType.INCLUDE ?
 
 If I remember correctly, Spring (as an example of an MVC framework) allows
 to switch view rendering from one using forward to one using include with a
 single boolean option. If it is an INCLUDE it means that the request has
 already been handled somehow, so it is likely safe for the JSP page to
 handle it.

Hmm. Not sure. Let's wait and see if anyone hits this issue before the EG makes
a decision. The Spring developers and I share an employer so if there were
issues here I'd have expected to have been asked to fix them by now.

-- 
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 56518] NIO async servlet limit latch leak

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #8 from Mark Thomas ma...@apache.org ---
(In reply to hanyong from comment #7)
 It seems the bug does not fixed in tomcat 8, but make
 it more difficult to reproduce.

I wondered if that might be the case. I've spent quite a bit of time looking at
this and don't see a simple solution at this point.

-- 
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 failure in ASF Buildbot on tomcat-7-trunk

2014-06-05 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/95

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1600671
Blamelist: kkolinko,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



buildbot success in ASF Buildbot on tomcat-trunk

2014-06-05 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/149

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1600680
Blamelist: kkolinko,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: r1600743 - in /tomcat/trunk: java/org/apache/tomcat/websocket/server/WsServerContainer.java webapps/docs/changelog.xml webapps/docs/web-socket-howto.xml

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 19:57:35 2014
New Revision: 1600743

URL: http://svn.apache.org/r1600743
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56577
Better executor configuration.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/web-socket-howto.xml

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1600743r1=1600742r2=1600743view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java 
Thu Jun  5 19:57:35 2014
@@ -27,7 +27,7 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -119,7 +119,6 @@ public class WsServerContainer extends W
 }
 // Executor config
 int executorCoreSize = 0;
-int executorMaxSize = 200;
 long executorKeepAliveTimeSeconds = 60;
 value = servletContext.getInitParameter(
 Constants.EXECUTOR_CORE_SIZE_INIT_PARAM);
@@ -127,11 +126,6 @@ public class WsServerContainer extends W
 executorCoreSize = Integer.parseInt(value);
 }
 value = servletContext.getInitParameter(
-Constants.EXECUTOR_MAX_SIZE_INIT_PARAM);
-if (value != null) {
-executorMaxSize = Integer.parseInt(value);
-}
-value = servletContext.getInitParameter(
 Constants.EXECUTOR_KEEPALIVETIME_SECONDS_INIT_PARAM);
 if (value != null) {
 executorKeepAliveTimeSeconds = Long.parseLong(value);
@@ -161,8 +155,8 @@ public class WsServerContainer extends W
 WsThreadFactory wsThreadFactory = new WsThreadFactory(threadGroup);
 
 executorService = new ThreadPoolExecutor(executorCoreSize,
-executorMaxSize, executorKeepAliveTimeSeconds, 
TimeUnit.SECONDS,
-new LinkedBlockingQueueRunnable(), wsThreadFactory);
+Integer.MAX_VALUE, executorKeepAliveTimeSeconds, 
TimeUnit.SECONDS,
+new SynchronousQueueRunnable(), wsThreadFactory);
 }
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1600743r1=1600742r2=1600743view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jun  5 19:57:35 2014
@@ -212,6 +212,10 @@
 behaviour for codeSession.getRequestURI()/code which may result in
 further changes. (markt)
   /fix
+  fix
+bug56577/bug: Improve the executor configuration used for the
+callbacks associated with asynchronous writes. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Other

Modified: tomcat/trunk/webapps/docs/web-socket-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/web-socket-howto.xml?rev=1600743r1=1600742r2=1600743view=diff
==
--- tomcat/trunk/webapps/docs/web-socket-howto.xml (original)
+++ tomcat/trunk/webapps/docs/web-socket-howto.xml Thu Jun  5 19:57:35 2014
@@ -118,10 +118,9 @@ implement its own timeout mechanism to h
ul
  licodeorg.apache.tomcat.websocket.executorCoreSize/code: The core
  size of the executor thread pool. If not set, the default of 0 (zero)
- is used./li
- licodeorg.apache.tomcat.websocket.executorMaxSize/code: The maximum
- permitted size of the executor thread pool. If not set, the default of
- 200 is used./li
+ is used. Note that the maximum permitted size of the executor thread
+ pool is hard coded to codeInteger.MAX_VALUE/code which effectively
+ means it is unlimited./li
  licodeorg.apache.tomcat.websocket.executorKeepAliveTimeSeconds/code:
  The maximum time an idle thread will remain in the executor thread 
pool
  until it is terminated. If not specified, the default of 60 seconds is



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



svn commit: r1600750 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/server/WsServerContainer.java webapps/docs/changelog.xml webapps/docs/web-socket-howto.xml

2014-06-05 Thread markt
Author: markt
Date: Thu Jun  5 20:29:54 2014
New Revision: 1600750

URL: http://svn.apache.org/r1600750
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56577
Better executor configuration.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1600743

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1600750r1=1600749r2=1600750view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
 Thu Jun  5 20:29:54 2014
@@ -27,7 +27,7 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -119,7 +119,6 @@ public class WsServerContainer extends W
 }
 // Executor config
 int executorCoreSize = 0;
-int executorMaxSize = 200;
 long executorKeepAliveTimeSeconds = 60;
 value = servletContext.getInitParameter(
 Constants.EXECUTOR_CORE_SIZE_INIT_PARAM);
@@ -127,11 +126,6 @@ public class WsServerContainer extends W
 executorCoreSize = Integer.parseInt(value);
 }
 value = servletContext.getInitParameter(
-Constants.EXECUTOR_MAX_SIZE_INIT_PARAM);
-if (value != null) {
-executorMaxSize = Integer.parseInt(value);
-}
-value = servletContext.getInitParameter(
 Constants.EXECUTOR_KEEPALIVETIME_SECONDS_INIT_PARAM);
 if (value != null) {
 executorKeepAliveTimeSeconds = Long.parseLong(value);
@@ -159,8 +153,8 @@ public class WsServerContainer extends W
 WsThreadFactory wsThreadFactory = new WsThreadFactory(threadGroup);
 
 executorService = new ThreadPoolExecutor(executorCoreSize,
-executorMaxSize, executorKeepAliveTimeSeconds, 
TimeUnit.SECONDS,
-new LinkedBlockingQueueRunnable(), wsThreadFactory);
+Integer.MAX_VALUE, executorKeepAliveTimeSeconds, 
TimeUnit.SECONDS,
+new SynchronousQueueRunnable(), wsThreadFactory);
 }
 
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1600750r1=1600749r2=1600750view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jun  5 20:29:54 2014
@@ -118,6 +118,10 @@
 behaviour for codeSession.getRequestURI()/code which may result in
 further changes. (markt)
   /fix
+  fix
+bug56577/bug: Improve the executor configuration used for the
+callbacks associated with asynchronous writes. (markt)
+  /fix
 /changelog
   /subsection
 /section

Modified: tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml?rev=1600750r1=1600749r2=1600750view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml Thu Jun  5 20:29:54 
2014
@@ -120,10 +120,9 @@ implement its own timeout mechanism to h
ul
  licodeorg.apache.tomcat.websocket.executorCoreSize/code: The core
  size of the executor thread pool. If not set, the default of 0 (zero)
- is used./li
- licodeorg.apache.tomcat.websocket.executorMaxSize/code: The maximum
- permitted size of the executor thread pool. If not set, the default of
- 200 is used./li
+ is used. Note that the maximum permitted size of the executor thread
+ pool is hard coded to codeInteger.MAX_VALUE/code which effectively
+ means it is unlimited./li
  licodeorg.apache.tomcat.websocket.executorKeepAliveTimeSeconds/code:
  The maximum time an idle thread will remain in the executor thread 
pool
  until it is terminated. If not specified, the default of 60 seconds is




[Bug 56577] [websocket] Inappropriate executor in WsServerContainer

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56577

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas ma...@apache.org ---
Thanks for the report. I've had a long hard think about the desired behaviour
and reconfigured the executor accordingly. The fix is in 8.0.x for 8.0.9
onwards and in 7.0.x for 7.0.55 onwards.

The short version is:
- Core size is configurable but defaults to 0.
- Threads die after 60s of inactivity
- Thread pool grows unbounded if a new task is added and no thread is available
to service 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 54618] Add filter implementing HTTP Strict Transport Security (HSTS) [PATCH]

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54618

--- Comment #8 from Steve Sether st...@sether.org ---
I think this is an important feature for Tomcat to support out of the box. 

Furthermore though, headers like this should be insanely easy to just add to
all the headers of a domain hosted on a machine.  Apache solves this very
easily with a single configuration line:

Header add Strict-Transport-Security max-age=15768000

So this is incredibly trivial to do in Apache since adding headers is very,
very easy.  It's far harder to do this on Tomcat since it requires code
modifications.  Why can't Tomcat have a similar feature?

IMO the solution should be broader than just this one header, and should be a
simple config option that an admin can add or subtract rather than having to
implement this on every web application.

I think it's vitally important that the admin should be able to control this,
since the security feature it implements crosses multiple applications on a
server, not just one.  That's something a good administrator can implement
quickly, and would be far harder and more error prone to add at the application
level.

-- 
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 55006] Add http proxy support for ClientEndpoint using system properties [PATCH]

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55006

Scott Frederick scottyf...@gmail.com changed:

   What|Removed |Added

 CC||scottyf...@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



buildbot success in ASF Buildbot on tomcat-7-trunk

2014-06-05 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/96

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1600750
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



[Bug 56596] New: OpenSSL 1.0.1g is vulnerable to a man-in-the-middle attack

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56596

Bug ID: 56596
   Summary: OpenSSL 1.0.1g is vulnerable to a man-in-the-middle
attack
   Product: Tomcat Native
   Version: 1.1.30
  Hardware: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Library
  Assignee: dev@tomcat.apache.org
  Reporter: bsa...@benefitconcepts.com

Open SSL has issued a security advisory against a man-in -the-middle attack
vulnerability and recommends to upgrade to open ssl version 1.0.1h
The latest Tomcat native library was build using openssl 1.0.1g.

Please create a new build with the latest open SSL version 1.0.1h to mitigate
this vulnerability in tomcat native library. 

The following links describe the vulnerability - 
https://www.us-cert.gov/ncas/current-activity/2014/06/05/OpenSSL-Releases-Security-Advisory
http://www.openssl.org/news/secadv_20140605.txt
http://www.kb.cert.org/vuls/id/978508

-- 
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 56596] OpenSSL 1.0.1g is vulnerable to a man-in-the-middle attack

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56596

Bhupesh Saini bsa...@benefitconcepts.com changed:

   What|Removed |Added

 OS||All
   Severity|major   |critical

-- 
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 failure in ASF Buildbot on tomcat-trunk

2014-06-05 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/150

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1600743
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



[Bug 56597] New: tomcat 8 svn tags is not standard so not synced to git

2014-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56597

Bug ID: 56597
   Summary: tomcat 8 svn tags is not standard so not synced to git
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: observer.h...@alibaba-inc.com

We use git as VCS, so we clone tomcat code from github
https://github.com/apache/tomcat , and found the new tags such as
http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_1/ do not synced
to the git.

I submitted a bug to ASF infrastructure which make the git mirror,
see HERE: https://issues.apache.org/jira/browse/INFRA-7861.
But they think tomcat/tc8.0.x/tags is not the standard layout so this is not
a Problem.

The missing of the new tags in git is not convenient for us.
Could anyone help to fix this ?

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



[jira] [Commented] (MTOMCAT-257) Classpathes separation between plugin and application is broken (can't use slf4j-jcl in app)

2014-06-05 Thread Andreas Christoforides (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14019548#comment-14019548
 ] 

Andreas Christoforides commented on MTOMCAT-257:


I ran into another case of this issue so I looked at the code to see how the 
useSeparateTomcatClassLoader parameter is used.

It seems the issue was introduced by this change:
http://svn.apache.org/viewvc/tomcat/maven-plugin/tags/tomcat-maven-plugin-2.0/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java?r1=1297072r2=1297073;

All dependencies of the plugin are added to the separate Tomcat classoader. 

It certain cases that is desirable as described in:
https://issues.apache.org/jira/browse/MTOMCAT-122

In other cases, it makes the plugin unusable since it brings in unwanted 
libraries like slf4j and google guava.

 Classpathes separation between plugin and application is broken (can't use 
 slf4j-jcl in app)
 

 Key: MTOMCAT-257
 URL: https://issues.apache.org/jira/browse/MTOMCAT-257
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
  Components: tomcat7
Affects Versions: 2.1
Reporter: Brendan Le Ny
Assignee: Olivier Lamy (*$^¨%`£)
 Attachments: MTOMCAT-227-2.zip, MTOMCAT-227.tgz


 I use in my war the slf4j-jcl, which is not compatible with the 
 jcl-over-slf4j used in the plugin dependencies.
 I give you a little project that show the problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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