Re: Tagging 8.0.x

2015-02-11 Thread Violeta Georgieva
Hi Mark,

2015-02-11 21:40 GMT+02:00 Mark Thomas :
>
> We've had a couple of important Coyote fixes since the last release so
> I'm planning on tagging 8.0.x tomorrow.
>
> In my mind this is a slightly delayed beginning of Feb release. I plan
> to get back to a roughly beginning of the month schedule next month.

Do we need Tomcat 7 release also?

Thanks,
Violeta

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


[Bug 57573] Host Header Internal IP Address Disclosure

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57573

--- Comment #3 from xinshouke <1599409...@qq.com> ---
I had no found there is a config about IP in my server.xml. Just a 'localhost'.
I attached my server.xml in the attachment.

-- 
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 57573] Host Header Internal IP Address Disclosure

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57573

xinshouke <1599409...@qq.com> changed:

   What|Removed |Added

 CC||1599409...@qq.com

--- Comment #2 from xinshouke <1599409...@qq.com> ---
Created attachment 32461
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32461&action=edit
my connector configuration

-- 
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 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

--- Comment #8 from VIN  ---
Created attachment 32460
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32460&action=edit
Updated patch with suggested comments

Please let me know if anything is missing.

-- 
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 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

--- Comment #7 from VIN  ---
I updated the code as per your comments.
Generated java doc for LibraryNotFoundError.java class and added to patch.
Now the patch is of 100KB size.
I attached the updated patch.
Please review 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



Re: [VOTE] Release Apache Taglibs 1.2.3

2015-02-11 Thread Jeremy Boynes

> On Feb 10, 2015, at 8:40 PM, Jeremy Boynes  wrote:
> 
> The proposed Apache Taglibs 1.2.3 release is now available for voting.
> 
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/taglibs/taglibs-standard-1.2.3/
> 
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1034/
> 
> The SVN tag is:
> http://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.3/
> 
> The proposed 1.2.3 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 1.2.3 Stable

JSTL TCK passed in the following environment:
Mac OS X 10.10.2
Apache Tomcat 7.0.57
Apache Xalan 2.7.1
CATALINA_OPTS="-Dorg.apache.taglibs.standard.xml.accessExternalEntity=http 
-Djavax.xml.accessExternalDTD=http"

with the following configurations:
Java 1.8.0_31, -jstlel jar, in container, with security manager
Java 1.8.0_31, -compat jar, in container, with security manager
Java 1.7.0_75, -jstlel jar, in container, with security manager
Java 1.6.0_65, -jstlel jar, in container, with security manager

Thanks
Jeremy



signature.asc
Description: Message signed with OpenPGP using GPGMail


[Bug 57540] report TLS protocol version

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57540

--- Comment #8 from Christopher Schultz  ---
(In reply to Ralf Hauser from comment #6)
> Created attachment 32437 [details]
> apache.tomcat.tls.protocol.57540.patch

Is IOException the most natural exception type for SSLSupport.getProtocol?
Under what circumstances do you expect an exception to be thrown (other than
APR, which will probably not throw an IOException when properly-implemented)?

If you aren't going to implement it yet for APR, you could throw
UnsupportedOperationException except that this code is called
unconditionally and without any try/catch in Http11Protocol, so the patch as it
stands will break requests coming from an APR connector. :(

-- 
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 57432] Incorrect values for SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57432

--- Comment #3 from Christopher Schultz  ---
(In reply to Jeff Pinner from comment #0)
> Bug 53952 added support for TLS 1.1 and TLS 1.2 and added the following
> constants (from jni/java/org/apache/tomcat/jni/SSL.java)
> 
> public static final int SSL_OP_NO_TLSv1_1   = 0x0800;
> public static final int SSL_OP_NO_TLSv1_2   = 0x1000;

For the record, these constants were added in r1632577 which slightly pre-dates
the commits directly-related to bug #53952.

Also note that these constants were never back-ported to Tomcat 7.

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



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

2015-02-11 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test-apr has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-apr :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-APR/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/gump_work/build_tomcat-trunk_tomcat-trunk-test-apr.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 6 mins 4 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native/dest-20150212/lib 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150212.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -Dexecute.test.nio=false 
-Dtest
 .openssl.path=/srv/gump/public/workspace/openssl/dest-20150212/bin/openssl 
-Dexecute.test.apr=true -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/bu
 
ild/lib/tomcat-spdy.jar:/srv/gum

[GUMP@vmgump]: Project tomcat-tc7.0.x-test-apr (in module tomcat-7.0.x) failed

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


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -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.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-APR/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test-apr/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-apr.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 4 mins 28 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native/dest-20150212/lib 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150212.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dexecute.te
 st.nio=false -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=true -Dexecute.test.bio=false 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20150212.jar
 -Dtest.temp=output/test-tmp-APR 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.

[Bug 57573] Host Header Internal IP Address Disclosure

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57573

Christopher Schultz  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Christopher Schultz  ---
This is likely a configuration problem.

What software are you using as a reverse proxy? What does Tomcat's 
configuration look like?

-- 
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 57573] New: Host Header Internal IP Address Disclosure

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57573

Bug ID: 57573
   Summary: Host Header Internal IP Address Disclosure
   Product: Tomcat 6
   Version: 6.0.4
  Hardware: All
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: 1599409...@qq.com

I upgrade my tomcat server to 6.0.41, When accessed the web site using Chrome,
there is some response header in developer tools as below; The security team
said this was a risk and ask it must hide the IP in Parameter Location. Would
you like to correct the issue?

--the response header from my web site
Response Headersview source
Connection:Keep-alive
Content-Language:zh-CN
Content-Length:0
Content-Type:text/html;charset=UTF-8
Date:Thu, 12 Feb 2015 03:59:20 GMT
Keep-Alive:timeout=15, max=100
Location:http://218.201.202.225/seeyon/index.jsp
Server:Apache-Coyote/1.1
Via:1.1 ID-0001544136376125 uproxy-2

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



[GUMP@vmgump]: Project tomcat-tc8.0.x-test-apr (in module tomcat-8.0.x) failed

2015-02-11 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-tc8.0.x-test-apr has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc8.0.x-test-apr :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-APR/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-apr/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-apr.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 6 mins 34 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native/dest-20150212/lib 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150212.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -Dexecute.test.nio=false 
-Dtest
 .openssl.path=/srv/gump/public/workspace/openssl/dest-20150212/bin/openssl 
-Dexecute.test.apr=true -Dexecute.test.bio=false -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-8.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-8.0.x/outpu

[GUMP@vmgump]: Project tomcat-tc8.0.x-test-nio2 (in module tomcat-8.0.x) failed

2015-02-11 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-tc8.0.x-test-nio2 has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc8.0.x-test-nio2 :  Tomcat 8.x, a web server implementing the 
Java Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/logs-NIO2
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-NIO2/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-nio2/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-nio2 (Type: Build)
Work ended in a state of : Failed
Elapsed: 27 mins 21 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.2-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO2 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150212.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150212-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true 
-Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl/dest-20150212/bin/opens
 sl -Dexecute.test.apr=false -Dexecute.test.bio=false -Dexecute.test.nio2=true 
-Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.4-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-8.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/bu
 
ild/lib/tomcat-spdy.jar:/srv/gump/public/workspace/tomcat

Re: svn commit: r1659043 - in /tomcat/trunk: java/org/apache/catalina/filters/CorsFilter.java test/org/apache/catalina/filters/TestCorsFilter.java

2015-02-11 Thread Konstantin Kolinko
2015-02-11 22:18 GMT+03:00  :
> Author: markt
> Date: Wed Feb 11 19:18:46 2015
> New Revision: 1659043
>
> URL: http://svn.apache.org/r1659043
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57534
> CORS Filter should only look at media type component of content type
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java
> tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java
>
> Modified: tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java?rev=1659043&r1=1659042&r2=1659043&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java Wed Feb 11 
> 19:18:46 2015
> @@ -639,11 +639,10 @@ public final class CorsFilter implements
>  } else if ("GET".equals(method) || 
> "HEAD".equals(method)) {
>  requestType = CORSRequestType.SIMPLE;
>  } else if ("POST".equals(method)) {
> -String contentType = request.getContentType();
> -if (contentType != null) {
> -contentType = contentType.toLowerCase().trim();
> +String mediaType = 
> getMediaType(request.getContentType());
> +if (mediaType != null) {
>  if (SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES
> -.contains(contentType)) {
> +.contains(mediaType)) {
>  requestType = CORSRequestType.SIMPLE;
>  } else {
>  requestType = CORSRequestType.ACTUAL;
> @@ -662,6 +661,23 @@ public final class CorsFilter implements
>  }
>
>
> +/*
> + * Return the lower case, trimmed value of the media type from the 
> content
> + * type.
> + */
> +private String getMediaType(String contentType) {
> +if (contentType == null) {
> +return null;
> +}
> +String result = contentType.toLowerCase();

We usually use  Locale.ENGLISH  in such code.

> +int firstSemiColonIndex = result.indexOf(';');
> +if (firstSemiColonIndex > -1) {
> +result = result.substring(0, firstSemiColonIndex);
> +}
> +result = result.trim();
> +return result;
> +}
> +

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



[Bug 57570] Make processing of chunked encoding trailers an opt-in feature (align with HTTPD 2.4.12)

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57570

Konstantin Kolinko  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Konstantin Kolinko  ---
The servlet specification (3.1) does not mention chunked encoding trailers. It
would be better if there were a separate API to access them.  Treating trailers
as proper headers is a simplification, it hides the difference between them.

-- 
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 57570] New: Make processing of chunked encoding trailers an opt-in feature (align with HTTPD 2.4.12)

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57570

Bug ID: 57570
   Summary: Make processing of chunked encoding trailers an opt-in
feature (align with HTTPD 2.4.12)
   Product: Tomcat 8
   Version: 8.0.18
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: knst.koli...@gmail.com

Two weeks ago Apache HTTPD 2.4.12 release was announced. It contains a fix for
the following issue:


CVE-2013-5704 (cve.mitre.org)
 core: HTTP trailers could be used to replace HTTP headers
 late during request processing, potentially undoing or
 otherwise confusing modules that examined or modified
 request headers earlier.  Adds "MergeTrailers" directive to restore
 legacy behavior.


-> [1],[2].


Apparently this has been discussed in the open for about a year in relation to
HTTPD [3] and in general [4], but I have not seen anyone raising the issue for
Tomcat yet.


In Tomcat  chunked encoding trailers are processed by ChunkedInputFilter 
(.parseEndChunk() -> .parseHeader()). The values are available as headers
(TestChunkedInputFilter$EchoHeaderServlet)

This was implemented via bug 49860 and is available since 6.0.30, 7.0.5 in all
current versions. (r1039090 in 6.0.x)


If we follow in HTTPD steps, a solution is to make processing of these trailers
an opt-in feature, being off by default.  A mitigation is already available
with the existing features: it is possible to limit size of trailer headers via
configuration.

Tomcat 6: [5]
org.apache.coyote.MAX_TRAILER_SIZE=0

Tomcat 7 and later: [6]
maxTrailerSize="0" on an HTTP connector


In the simplest case "making processing of trailers an opt-in feature" means
changing the defaults for those options to be 0.

Note that setting those values to 0 does enforce the limit. It differs from
"just ignoring" the headers. So there is a place for having a separate option.

I think that if someone is actually using trailers, a better configuration
option would be a white list of expected trailer names, with non-whitelisted
trailers being ignored.



[1] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5704
[2] https://access.redhat.com/security/cve/CVE-2013-5704

[3] http://marc.info/?l=apache-httpd-dev&m=139636309822854&w=2
"CVE-2013-5704, mod_headers and chunked trailer fields"
mail thread, April 2014

[4] http://martin.swende.se/blog/HTTPChunked.html
"Chunked HTTP transfer encoding"

[5] http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Other

[6]
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Standard_Implementation

-- 
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 57532] Session expire message sent to cluster nodes even with DeltaSession configuration not to

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57532

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution|--- |INVALID

--- Comment #5 from Mark Thomas  ---
You are missing:



I've just confirmed with my 4-node test cluster and the latest 7.0.x code that
- providing this is present - the sessions fail over correctly when the current
primary node is shutdown gracefully.

-- 
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 57432] Incorrect values for SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57432

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #2 from Mark Thomas  ---
Fixed in trunk and 8.0.x (for 8.0.19 onwards).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1659060 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/jni/SSL.java webapps/docs/changelog.xml

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 20:36:37 2015
New Revision: 1659060

URL: http://svn.apache.org/r1659060
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57432
Align SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 constant values with OpenSSL 
(they had been swapped).

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/SSL.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 11 20:36:37 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059

Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/SSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/S

svn commit: r1659059 - /tomcat/trunk/java/org/apache/tomcat/jni/SSL.java

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 20:32:57 2015
New Revision: 1659059

URL: http://svn.apache.org/r1659059
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57432
Align SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 constant values with OpenSSL 
(they had been swapped).

Modified:
tomcat/trunk/java/org/apache/tomcat/jni/SSL.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSL.java?rev=1659059&r1=1659058&r2=1659059&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/SSL.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSL.java Wed Feb 11 20:32:57 2015
@@ -137,8 +137,8 @@ public final class SSL {
 public static final int SSL_OP_NO_SSLv2 = 
0x0100;
 public static final int SSL_OP_NO_SSLv3 = 
0x0200;
 public static final int SSL_OP_NO_TLSv1 = 
0x0400;
-public static final int SSL_OP_NO_TLSv1_1   = 
0x0800;
-public static final int SSL_OP_NO_TLSv1_2   = 
0x1000;
+public static final int SSL_OP_NO_TLSv1_2   = 
0x0800;
+public static final int SSL_OP_NO_TLSv1_1   = 
0x1000;
 
 public static final int SSL_OP_NO_TICKET= 
0x4000;
 



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



[Bug 57432] Incorrect values for SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57432

Konstantin Kolinko  changed:

   What|Removed |Added

  Component|Library |Connectors
Version|1.1.32  |8.0.18
Product|Tomcat Native   |Tomcat 8
   Target Milestone|--- |

--- Comment #1 from Konstantin Kolinko  ---
Java code of Tomcat Native is maintained in Tomcat proper. I am moving the bug
there.

-- 
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 57564] Make JspC amenable to subclassing

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57564

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Fixed in trunk and 8.0.x for 8.0.19 onwards.

Thanks for the patch.

-- 
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: r1659054 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/jasper/JspC.java webapps/docs/changelog.xml

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 20:01:23 2015
New Revision: 1659054

URL: http://svn.apache.org/r1659054
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57564
Make JspC amenable to sub-classing
Patch provided by Jan Bartel

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspC.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 11 20:01:23 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053

Modified: tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspC.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspC.java?rev=1659054&r1=1659053&r2=1659054&view=diff
==

svn commit: r1659053 - /tomcat/trunk/java/org/apache/jasper/JspC.java

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 19:59:58 2015
New Revision: 1659053

URL: http://svn.apache.org/r1659053
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57564
Make JspC amenable to sub-classing
Patch provided by Jan Bartel

Modified:
tomcat/trunk/java/org/apache/jasper/JspC.java

Modified: tomcat/trunk/java/org/apache/jasper/JspC.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1659053&r1=1659052&r2=1659053&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspC.java Wed Feb 11 19:59:58 2015
@@ -252,6 +252,8 @@ public class JspC extends Task implement
 protected JspConfig jspConfig = null;
 protected TagPluginManager tagPluginManager = null;
 
+protected TldScanner scanner = null;
+
 protected boolean verbose = false;
 protected boolean listErrors = false;
 protected boolean showSuccess = false;
@@ -1461,6 +1463,23 @@ public class JspC extends Task implement
 }
 }
 
+
+protected void initTldScanner(JspCServletContext context, ClassLoader 
classLoader) {
+if (scanner != null) {
+return;
+}
+
+scanner = newTldScanner(context, true, isValidateTld(), 
isBlockExternal());
+scanner.setClassLoader(classLoader);
+}
+
+
+protected TldScanner newTldScanner(JspCServletContext context, boolean 
namespaceAware,
+boolean validate, boolean blockExternal) {
+return new TldScanner(context, namespaceAware, validate, 
blockExternal);
+}
+
+
 protected void initServletContext(ClassLoader classLoader)
 throws IOException, JasperException {
 // TODO: should we use the Ant Project's log?
@@ -1473,9 +1492,8 @@ public class JspC extends Task implement
 context.setInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM, 
"true");
 }
 
-TldScanner scanner = new TldScanner(
-context, true, isValidateTld(), isBlockExternal());
-scanner.setClassLoader(classLoader);
+
+initTldScanner(context, classLoader);
 
 try {
 scanner.scan();



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



[Bug 57540] report TLS protocol version

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57540

--- Comment #7 from Mark Thomas  ---
Reviewing the proposed patch:

1. The changes to tomcat/util/net/jsse/openssl/Protocol.java need to be removed

2. There looks to be the right hooks in tc-native to obtain the protocol so do
that rather than throw an IOE for APR.

3. Comment lines should wrap at 80 chars.

4. The Javadoc comments starting "as per..." should not refer to this bug
report but fully describe the elements they are documenting. I'd expect the
description for the attribute name to be different to that for the method.

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



Tagging 8.0.x

2015-02-11 Thread Mark Thomas
We've had a couple of important Coyote fixes since the last release so
I'm planning on tagging 8.0.x tomorrow.

In my mind this is a slightly delayed beginning of Feb release. I plan
to get back to a roughly beginning of the month schedule next month.

Mark

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



[Bug 45014] Request and Response classes should have wrappers for use in Valves

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45014

mr.oliver.hernan...@gmail.com changed:

   What|Removed |Added

  Attachment #32446|0   |1
is obsolete||

-- 
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 45014] Request and Response classes should have wrappers for use in Valves

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45014

--- Comment #24 from mr.oliver.hernan...@gmail.com ---
Created attachment 32456
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32456&action=edit
Maven project for a valve that dumps the full request with the body

NOTE: For our use case, we needed a valve in JBoss, so this was coded against
the forked version of Tomcat within JBoss.  It should be simple to refactor for
use with the main trunk of Tomcat.

02/11/15 - fixed bug that was displaying post body incorrectly.

-- 
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 57534] CorsFilter.SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES check shall ignore content-type parameters

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57534

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #4 from Mark Thomas  ---
Fixed in trunk, 8.0.x (for 8.0.19 onwards( and 7.0.x (for 7.0.60 onwards)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1659046 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/filters/CorsFilter.java test/org/apache/catalina/filters/TestCorsFilter.java webapps/docs/changelog.xml

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 19:24:16 2015
New Revision: 1659046

URL: http://svn.apache.org/r1659046
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57534
CORS Filter should only look at media type component of content type

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/filters/CorsFilter.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCorsFilter.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 11 19:24:16 2015
@@ -1,2 +1,2 @@
-/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1647030,1647043,1648816,1651420-1651422,1651844,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1655109,1655112,1655114-1655115,1655117,1655120,1655445,1655467,1656300,1657049,1657356,1657360,1657370,1657460,1657908,1658208,1658737,1658801-1658803,1658811,1658834
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 
498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346365,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1352056,1352059,1
 
352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,1353501,1353581,1353708,1354137,1354170,1354197,1354255,1354362,1354375,1354469,1354664,1354685,1354817,1354847,1354856,1355726,1355810,1356006-1356007,1356014,1356045,1356125,1356422,1356505,1356898,1357042,1357401,1357407,1358586,1358590,1358612-1358613,1359102,1359340,1359981,1360059,1360455,1360460,1360838,1360847,1360892,1360942,1361

svn commit: r1659045 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/filters/CorsFilter.java test/org/apache/catalina/filters/TestCorsFilter.java webapps/docs/changelog.xml

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 19:22:42 2015
New Revision: 1659045

URL: http://svn.apache.org/r1659045
Log: (empty)

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/filters/CorsFilter.java
tomcat/tc8.0.x/trunk/test/org/apache/catalina/filters/TestCorsFilter.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 11 19:22:42 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/filters/CorsFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/filters/CorsFilter.java?rev=1659045&r1=1659044&r2=1659045&view=diff
=

svn commit: r1659043 - in /tomcat/trunk: java/org/apache/catalina/filters/CorsFilter.java test/org/apache/catalina/filters/TestCorsFilter.java

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 19:18:46 2015
New Revision: 1659043

URL: http://svn.apache.org/r1659043
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=57534
CORS Filter should only look at media type component of content type

Modified:
tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java
tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java

Modified: tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java?rev=1659043&r1=1659042&r2=1659043&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java (original)
+++ tomcat/trunk/java/org/apache/catalina/filters/CorsFilter.java Wed Feb 11 
19:18:46 2015
@@ -639,11 +639,10 @@ public final class CorsFilter implements
 } else if ("GET".equals(method) || "HEAD".equals(method)) {
 requestType = CORSRequestType.SIMPLE;
 } else if ("POST".equals(method)) {
-String contentType = request.getContentType();
-if (contentType != null) {
-contentType = contentType.toLowerCase().trim();
+String mediaType = 
getMediaType(request.getContentType());
+if (mediaType != null) {
 if (SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES
-.contains(contentType)) {
+.contains(mediaType)) {
 requestType = CORSRequestType.SIMPLE;
 } else {
 requestType = CORSRequestType.ACTUAL;
@@ -662,6 +661,23 @@ public final class CorsFilter implements
 }
 
 
+/*
+ * Return the lower case, trimmed value of the media type from the content
+ * type.
+ */
+private String getMediaType(String contentType) {
+if (contentType == null) {
+return null;
+}
+String result = contentType.toLowerCase();
+int firstSemiColonIndex = result.indexOf(';');
+if (firstSemiColonIndex > -1) {
+result = result.substring(0, firstSemiColonIndex);
+}
+result = result.trim();
+return result;
+}
+
 /**
  * Checks if the Origin is allowed to make a CORS request.
  *
@@ -1028,7 +1044,9 @@ public final class CorsFilter implements
 }
 
 /**
- * {@link Collection} of Simple HTTP request headers. Case in-sensitive.
+ * {@link Collection} of media type values for the Content-Type header that
+ * will be treated as 'simple'. Note media-type values are compared 
ignoring
+ * parameters and in a case-insensitive manner.
  *
  * @see  http://www.w3.org/TR/cors/#terminology";
  *   >http://www.w3.org/TR/cors/#terminology

Modified: tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java?rev=1659043&r1=1659042&r2=1659043&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java (original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java Wed Feb 
11 19:18:46 2015
@@ -1466,9 +1466,28 @@ public class TestCorsFilter {
 .getAttribute(CorsFilter.HTTP_REQUEST_ATTRIBUTE_REQUEST_TYPE));
 }
 
+/*
+ * A CORS request arrives with a "null" origin which is allowed by default.
+ */
 @Test
-public void testDestroy() {
-// Nothing to test.
-// NO-OP
+public void testContentTypeWithParameter() throws IOException,
+ServletException {
+TesterHttpServletRequest request = new TesterHttpServletRequest();
+
+request.setMethod("POST");
+request.setContentType("text/plain;charset=UTF-8");
+request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, "null");
+TesterHttpServletResponse response = new TesterHttpServletResponse();
+
+CorsFilter corsFilter = new CorsFilter();
+corsFilter.init(TesterFilterConfigs.getDefaultFilterConfig());
+CorsFilter.CORSRequestType requestType =
+corsFilter.checkRequestType(request);
+Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
+
+corsFilter.doFilter(request, response, filterChain);
+
+Assert.assertTrue(((Boolean) request.getAttribute(
+
CorsFilter.HTTP_REQUEST_ATTRIBUTE_IS_CORS_REQUEST)).booleanValue());
 }
 }



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



[Bug 57528] Random NPE when sending multipart content

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57528

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

-- 
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 57489] java.util.concurrent.ExecutionException: java.io.IOException: Key must be cancelled

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57489

--- Comment #11 from Mark Thomas  ---
I've fixed another issue. I don't think it will make any different but if you
could do a quick test it would be appreciated.

I've just noticed that the stack trace passes through the onOpen method of the
WebSocket Endpoint. That looks odd. I'm wondering if Atmosphere is doing
something we didn't anticipate with the API. I'll look further but I don't
expect to get this fixed for the next 8.0.x release. What I really need is a
simple test case to reproduce this issue.

-- 
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 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

--- Comment #6 from Christopher Schultz  ---
(In reply to Mark Thomas from comment #5)
> @Chris the difference with WARN and DEBUG is that DEBUG includes the stack
> trace. I'd say if debug is not enabled, log at WARN, else log at DEBUG so
> you never get more than one message.

ACK. I hadn't noticed the stack trace. Vin, please ignore my comment about WARN
versus DEBUG.

-- 
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 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

--- Comment #5 from Mark Thomas  ---
@Chris the difference with WARN and DEBUG is that DEBUG includes the stack
trace. I'd say if debug is not enabled, log at WARN, else log at DEBUG so you
never get more than one message.

Some more comments.

1. Check line length. Some appear to be over to 100 char limit for code lines.

2. Don't comment out code to disable it. Delete it. Just think how many lines
must have been deleted/changed in the last 10+ years. If we want to look at an
old version we'll use the version control system tools. We do not want to be
wading through reams of commented out code.

3. Try not to mix code formatting changes (e.g adding blank lines) with
functional changes.

-- 
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 57534] CorsFilter.SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES check shall ignore content-type parameters

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57534

--- Comment #3 from Mark Thomas  ---
You are right.

When I first looked at this I started to look at how the request content-type
header was parsed and that has some issues that would need
o.a.tomcat.util.http.parser.MediaType to solve but that isn't required for this
specific usage.

-- 
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: async and thread constraint

2015-02-11 Thread Romain Manni-Bucau
all green with the trunk. That you very much.


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 15:31 GMT+01:00 Mark Thomas :
> On 11/02/2015 13:54, Romain Manni-Bucau wrote:
>> that's it I think
>
> OK. Patch applied to trunk and 8.0.x. Let us know how you get on.
>
> Mark
>
>
>>
>> If you want servlet code let's do it (wanted to avoid code in mail
>> since I never manage to format it well):
>>
>> 1) request 1 (start the async context) does:
>>
>> // field context has type AsyncContext
>> context = req.startAsync(req, resp);
>> context.addListener(this); // not important for us but it is mainly to
>> handle errors etc
>> context.setTimeout(valueFromAnywhere);
>>
>> 2) request 2 does in its thread:
>>
>> // i skip some jaxrs impl internals like getting the response to push
>> to the client for request 1 etc
>> context.dispatch();
>>
>> And that's all in term of servlet API then you go back in servlet
>> chain and end on JAXRS servlet (or filter) which identified this
>> dispatch as a continuation and returns the expected data instead of
>> doing again request 1 call.
>>
>>
>> In term of tomcat calls we end up in
>> org.apache.catalina.core.AsyncContextImpl#dispatch(javax.servlet.ServletContext,
>> java.lang.String) and then
>> this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH,
>> null);.
>>
>> Finally we are in
>> org.apache.coyote.http11.AbstractHttp11Processor#action which does
>>
>> if (asyncStateMachine.asyncDispatch()) {
>> endpoint.processSocket(this.socketWrapper, SocketStatus.OPEN_READ, true);
>> }
>>
>> and org.apache.coyote.AsyncStateMachine#asyncDispatch checks
>> ContainerThreadMarker.isContainerThread() which is obviously true
>> since request 2 is a normal request so dispatch is skipped and
>> response is never sent (well not as expected and we get a timeout).
>>
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-02-11 14:27 GMT+01:00 Mark Thomas :
>>> On 11/02/2015 09:35, Romain Manni-Bucau wrote:
 Ok, let's look a jaxrs 2 sample and bind underlying implementation:

 @Path("touch")
 @ApplicationScoped
 public class Endpoint {
 private volatile AsyncResponse current;

 @GET
 public void async(@Suspended final AsyncResponse response) {
 if (current == null) {
 current = response;
 } else {
 throw new IllegalStateException("we shouldnt go here
 back since");
 }
 }

 @POST
 @Path("answer")
 public void async(final String response) {
 current.resume(response /* response content */); // spec
 doesnt mandate a new thread here but tomcat does
 }
 }

 So we have 2 methods:
 1) GET: this initiate a request. JAXRS implementation uses servlet
 container to get an AsyncContext no more
 2) POST: the JAXRS AsyncResponse#resume method will just call servlet
 AsyncContext#dispatch

 Issue is:dispatch is called in the ThreadLocal environment/context of
 POST request so resume/dispatch inherit from it. Finally when you go
 to the async dispatch in Coyoterequest you have a marker bound in
 ContainerThreadMarker (the POST one) so resume/dispatch is ignored but
 actually it should work.

 Is it clearer?
>>>
>>> Not really for me. The description is assuming a familiarity with JAXRS2
>>> that I don't have. Reading between the lines of what you have written I
>>> think I have found a problem but I am not sure it is the problem you are
>>> trying to describe.
>>>
>>> Consider the following which is described purely in terms of Servlet async:
>>>
>>> The first HTTP request (Req1) calls startAsync which creates the
>>> AsyncContext (AC1), stashes AC1 somewhere and then returns.
>>>
>>> The client then waits for the response (Res1).
>>>
>>>
>>> Some time later (but before the AsyncContext and client read timeout) a
>>> new HTTP request (Req2) retrieves the AsyncContext and calls dispatch().
>>>
>>> This dispatch() *always* needs to be on a new container thread because
>>> the current container thread is processing Req2/Res2 and the dispatch is
>>> for Req1/Res1.
>>>
>>> The bug is the test introduced in r1594198 is that the dispatch() was
>>> processed in the context of Req2/Res2.
>>>
>>>
>>> Note in all of the above I am ignoring how/where the AsyncContext is
>>> stashed and retrieved.
>>>
>>>
>>> I think I can put together a test case for the above. If this is the
>>> problem you are seeing then the patch should be fairly easy. The part
>>> that will take the time is reviewing the other Async states affected by
>>> r1594198 to determine if the same problem might occur for any of them.
>>>
>>> Mark
>>>
>>>

[Bug 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

Christopher Schultz  changed:

   What|Removed |Added

   Keywords||PatchAvailable

--- Comment #4 from Christopher Schultz  ---
Thanks for the patch!

Some comments:

1. In AprLifecycleListener.java, there is no need to log the error both at WARN
and DEBUG levels. WARN is sufficient.

2. s/Commenetd/Commented/

3. Add Javadoc for the Exception class.

-- 
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: async and thread constraint

2015-02-11 Thread Mark Thomas
On 11/02/2015 13:54, Romain Manni-Bucau wrote:
> that's it I think

OK. Patch applied to trunk and 8.0.x. Let us know how you get on.

Mark


> 
> If you want servlet code let's do it (wanted to avoid code in mail
> since I never manage to format it well):
> 
> 1) request 1 (start the async context) does:
> 
> // field context has type AsyncContext
> context = req.startAsync(req, resp);
> context.addListener(this); // not important for us but it is mainly to
> handle errors etc
> context.setTimeout(valueFromAnywhere);
> 
> 2) request 2 does in its thread:
> 
> // i skip some jaxrs impl internals like getting the response to push
> to the client for request 1 etc
> context.dispatch();
> 
> And that's all in term of servlet API then you go back in servlet
> chain and end on JAXRS servlet (or filter) which identified this
> dispatch as a continuation and returns the expected data instead of
> doing again request 1 call.
> 
> 
> In term of tomcat calls we end up in
> org.apache.catalina.core.AsyncContextImpl#dispatch(javax.servlet.ServletContext,
> java.lang.String) and then
> this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH,
> null);.
> 
> Finally we are in
> org.apache.coyote.http11.AbstractHttp11Processor#action which does
> 
> if (asyncStateMachine.asyncDispatch()) {
> endpoint.processSocket(this.socketWrapper, SocketStatus.OPEN_READ, true);
> }
> 
> and org.apache.coyote.AsyncStateMachine#asyncDispatch checks
> ContainerThreadMarker.isContainerThread() which is obviously true
> since request 2 is a normal request so dispatch is skipped and
> response is never sent (well not as expected and we get a timeout).
> 
> 
> 
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
> 
> 
> 2015-02-11 14:27 GMT+01:00 Mark Thomas :
>> On 11/02/2015 09:35, Romain Manni-Bucau wrote:
>>> Ok, let's look a jaxrs 2 sample and bind underlying implementation:
>>>
>>> @Path("touch")
>>> @ApplicationScoped
>>> public class Endpoint {
>>> private volatile AsyncResponse current;
>>>
>>> @GET
>>> public void async(@Suspended final AsyncResponse response) {
>>> if (current == null) {
>>> current = response;
>>> } else {
>>> throw new IllegalStateException("we shouldnt go here
>>> back since");
>>> }
>>> }
>>>
>>> @POST
>>> @Path("answer")
>>> public void async(final String response) {
>>> current.resume(response /* response content */); // spec
>>> doesnt mandate a new thread here but tomcat does
>>> }
>>> }
>>>
>>> So we have 2 methods:
>>> 1) GET: this initiate a request. JAXRS implementation uses servlet
>>> container to get an AsyncContext no more
>>> 2) POST: the JAXRS AsyncResponse#resume method will just call servlet
>>> AsyncContext#dispatch
>>>
>>> Issue is:dispatch is called in the ThreadLocal environment/context of
>>> POST request so resume/dispatch inherit from it. Finally when you go
>>> to the async dispatch in Coyoterequest you have a marker bound in
>>> ContainerThreadMarker (the POST one) so resume/dispatch is ignored but
>>> actually it should work.
>>>
>>> Is it clearer?
>>
>> Not really for me. The description is assuming a familiarity with JAXRS2
>> that I don't have. Reading between the lines of what you have written I
>> think I have found a problem but I am not sure it is the problem you are
>> trying to describe.
>>
>> Consider the following which is described purely in terms of Servlet async:
>>
>> The first HTTP request (Req1) calls startAsync which creates the
>> AsyncContext (AC1), stashes AC1 somewhere and then returns.
>>
>> The client then waits for the response (Res1).
>>
>>
>> Some time later (but before the AsyncContext and client read timeout) a
>> new HTTP request (Req2) retrieves the AsyncContext and calls dispatch().
>>
>> This dispatch() *always* needs to be on a new container thread because
>> the current container thread is processing Req2/Res2 and the dispatch is
>> for Req1/Res1.
>>
>> The bug is the test introduced in r1594198 is that the dispatch() was
>> processed in the context of Req2/Res2.
>>
>>
>> Note in all of the above I am ignoring how/where the AsyncContext is
>> stashed and retrieved.
>>
>>
>> I think I can put together a test case for the above. If this is the
>> problem you are seeing then the patch should be fairly easy. The part
>> that will take the time is reviewing the other Async states affected by
>> r1594198 to determine if the same problem might occur for any of them.
>>
>> Mark
>>
>>
>> -
>> 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

svn commit: r1658970 - /tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 14:29:15 2015
New Revision: 1658970

URL: http://svn.apache.org/r1658970
Log:
Update changelog

Modified:
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1658970&r1=1658969&r2=1658970&view=diff
==
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Wed Feb 11 14:29:15 2015
@@ -70,6 +70,11 @@
 of earlier versions and include a trailing separator if the real path
 refers to a directory. (markt)
   
+  
+Ensure that Servlet 3.0 async requests where startAsync()
+is called in one container thread and dispatch() is called
+in a different container thread complete correctly. (markt)
+  
 
   
   



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



svn commit: r1658969 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/coyote/AsyncStateMachine.java test/org/apache/catalina/core/TestAsyncContextImpl.java

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 14:27:16 2015
New Revision: 1658969

URL: http://svn.apache.org/r1658969
Log:
Follow up to r1594198
Limit cases where a dispatch is not performed because processing is already on 
a poller thread.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/tc8.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 11 14:27:16 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966

Modified: tomcat/tc8.0.x/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1658969&r1=1658968&r2

svn commit: r1658966 - in /tomcat/trunk: java/org/apache/coyote/AsyncStateMachine.java test/org/apache/catalina/core/TestAsyncContextImpl.java

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 14:22:00 2015
New Revision: 1658966

URL: http://svn.apache.org/r1658966
Log:
Follow up to r1594198
Limit cases where a dispatch is not performed because processing is already on 
a poller thread.

Modified:
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1658966&r1=1658965&r2=1658966&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] 
(original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Wed Feb 
11 14:22:00 2015
@@ -299,10 +299,22 @@ public class AsyncStateMachine {
 if (state == AsyncState.STARTING) {
 state = AsyncState.MUST_DISPATCH;
 } else if (state == AsyncState.STARTED ||
-state == AsyncState.READ_WRITE_OP ||
 state == AsyncState.TIMING_OUT ||
 state == AsyncState.ERROR) {
 state = AsyncState.DISPATCHING;
+// A dispatch is always required.
+// If on a non-container thread, need to get back onto a container
+// thread to complete the processing.
+// If on a container thread the current request/response are not 
the
+// request/response associated with the AsyncContext so need a new
+// container thread to process the different request/response.
+doDispatch = true;
+} else if (state == AsyncState.READ_WRITE_OP) {
+state = AsyncState.DISPATCHING;
+// If on a container thread then the socket will be added to the
+// poller poller when the thread exits the
+// AbstractConnectionHandler.process() method so don't do a 
dispatch
+// here which would add it to the poller a second time.
 if (!ContainerThreadMarker.isContainerThread()) {
 doDispatch = true;
 }

Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1658966&r1=1658965&r2=1658966&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Wed 
Feb 11 14:22:00 2015
@@ -2186,4 +2186,106 @@ public class TestAsyncContextImpl extend
 }
 }
 }
+
+@Test
+public void testDispatchFromOtherContainerThread() throws Exception {
+resetTracker();
+// Setup Tomcat instance
+Tomcat tomcat = getTomcatInstance();
+
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
+NonAsyncServlet nonAsyncServlet = new NonAsyncServlet();
+Tomcat.addServlet(ctx, "nonAsyncServlet", nonAsyncServlet);
+ctx.addServletMapping("/target", "nonAsyncServlet");
+
+AsyncStashServlet asyncStashServlet = new AsyncStashServlet();
+Wrapper w1 = Tomcat.addServlet(ctx, "asyncStashServlet", 
asyncStashServlet);
+w1.setAsyncSupported(true);
+ctx.addServletMapping("/asyncStashServlet", "asyncStashServlet");
+
+AsyncRetrieveServlet asyncRetrieveServlet = new AsyncRetrieveServlet();
+Wrapper w2 = Tomcat.addServlet(ctx, "asyncRetrieveServlet", 
asyncRetrieveServlet);
+w2.setAsyncSupported(true);
+ctx.addServletMapping("/asyncRetrieveServlet", "asyncRetrieveServlet");
+
+tomcat.start();
+
+// First request in separate thread because the response won't be
+// written until after the second request has been made.
+Thread t = new Thread(new Runnable() {
+@Override
+public void run() {
+try {
+getUrl("http://localhost:"; + getPort() + 
"/asyncStashServlet");
+} catch (IOException e) {
+e.printStackTrace();
+}
+}
+});
+t.start();
+
+// Wait for first request to get as far as it can
+int count = 0;
+while (count < 100 && getTrack() != null &&
+!getTrack().startsWith("AsyncStashServletGet-")) {
+count++;
+Thread.sleep(100);
+}
+
+getUrl("http://localhost:"; + getPort() + "/asyncRetrieveServlet");
+
+// Wait for second request to release first and allow it to complete
+String expectedTrack = 
"AsyncStashServletGet-AsyncRetrieveServletGet-NonAsyncServletGet-";
+count = 0;
+while (count < 100 && !getTrack().equals(expectedTrack)) {
+  

[Bug 57564] Make JspC amenable to subclassing

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57564

Christopher Schultz  changed:

   What|Removed |Added

   Keywords||PatchAvailable

-- 
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: async and thread constraint

2015-02-11 Thread Romain Manni-Bucau
that's it I think

If you want servlet code let's do it (wanted to avoid code in mail
since I never manage to format it well):

1) request 1 (start the async context) does:

// field context has type AsyncContext
context = req.startAsync(req, resp);
context.addListener(this); // not important for us but it is mainly to
handle errors etc
context.setTimeout(valueFromAnywhere);

2) request 2 does in its thread:

// i skip some jaxrs impl internals like getting the response to push
to the client for request 1 etc
context.dispatch();

And that's all in term of servlet API then you go back in servlet
chain and end on JAXRS servlet (or filter) which identified this
dispatch as a continuation and returns the expected data instead of
doing again request 1 call.


In term of tomcat calls we end up in
org.apache.catalina.core.AsyncContextImpl#dispatch(javax.servlet.ServletContext,
java.lang.String) and then
this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH,
null);.

Finally we are in
org.apache.coyote.http11.AbstractHttp11Processor#action which does

if (asyncStateMachine.asyncDispatch()) {
endpoint.processSocket(this.socketWrapper, SocketStatus.OPEN_READ, true);
}

and org.apache.coyote.AsyncStateMachine#asyncDispatch checks
ContainerThreadMarker.isContainerThread() which is obviously true
since request 2 is a normal request so dispatch is skipped and
response is never sent (well not as expected and we get a timeout).



Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 14:27 GMT+01:00 Mark Thomas :
> On 11/02/2015 09:35, Romain Manni-Bucau wrote:
>> Ok, let's look a jaxrs 2 sample and bind underlying implementation:
>>
>> @Path("touch")
>> @ApplicationScoped
>> public class Endpoint {
>> private volatile AsyncResponse current;
>>
>> @GET
>> public void async(@Suspended final AsyncResponse response) {
>> if (current == null) {
>> current = response;
>> } else {
>> throw new IllegalStateException("we shouldnt go here
>> back since");
>> }
>> }
>>
>> @POST
>> @Path("answer")
>> public void async(final String response) {
>> current.resume(response /* response content */); // spec
>> doesnt mandate a new thread here but tomcat does
>> }
>> }
>>
>> So we have 2 methods:
>> 1) GET: this initiate a request. JAXRS implementation uses servlet
>> container to get an AsyncContext no more
>> 2) POST: the JAXRS AsyncResponse#resume method will just call servlet
>> AsyncContext#dispatch
>>
>> Issue is:dispatch is called in the ThreadLocal environment/context of
>> POST request so resume/dispatch inherit from it. Finally when you go
>> to the async dispatch in Coyoterequest you have a marker bound in
>> ContainerThreadMarker (the POST one) so resume/dispatch is ignored but
>> actually it should work.
>>
>> Is it clearer?
>
> Not really for me. The description is assuming a familiarity with JAXRS2
> that I don't have. Reading between the lines of what you have written I
> think I have found a problem but I am not sure it is the problem you are
> trying to describe.
>
> Consider the following which is described purely in terms of Servlet async:
>
> The first HTTP request (Req1) calls startAsync which creates the
> AsyncContext (AC1), stashes AC1 somewhere and then returns.
>
> The client then waits for the response (Res1).
>
>
> Some time later (but before the AsyncContext and client read timeout) a
> new HTTP request (Req2) retrieves the AsyncContext and calls dispatch().
>
> This dispatch() *always* needs to be on a new container thread because
> the current container thread is processing Req2/Res2 and the dispatch is
> for Req1/Res1.
>
> The bug is the test introduced in r1594198 is that the dispatch() was
> processed in the context of Req2/Res2.
>
>
> Note in all of the above I am ignoring how/where the AsyncContext is
> stashed and retrieved.
>
>
> I think I can put together a test case for the above. If this is the
> problem you are seeing then the patch should be fairly easy. The part
> that will take the time is reviewing the other Async states affected by
> r1594198 to determine if the same problem might occur for any of them.
>
> Mark
>
>
> -
> 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



Re: [VOTE] Release Apache Taglibs 1.2.3

2015-02-11 Thread Konstantin Kolinko
2015-02-11 7:40 GMT+03:00 Jeremy Boynes :
> The proposed Apache Taglibs 1.2.3 release is now available for voting.
>
> It can be obtained from:
>  https://dist.apache.org/repos/dist/dev/tomcat/taglibs/taglibs-standard-1.2.3/
>
> The Maven staging repo is:
>  https://repository.apache.org/content/repositories/orgapachetomcat-1034/
>
> The SVN tag is:
>  
> http://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.3/
>
> The proposed 1.2.3 release is:
> [ ] Broken - do not release
> [x] Stable - go ahead and release as 1.2.3 Stable

Tested examples app (Tomcat 6 + Java 5)
Tested my apps running on Java 8 and Java 6.
I use c:,fmt:,fn: parts of the library.

Best regards,
Konstantin Kolinko

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



Re: async and thread constraint

2015-02-11 Thread Mark Thomas
On 11/02/2015 09:35, Romain Manni-Bucau wrote:
> Ok, let's look a jaxrs 2 sample and bind underlying implementation:
> 
> @Path("touch")
> @ApplicationScoped
> public class Endpoint {
> private volatile AsyncResponse current;
> 
> @GET
> public void async(@Suspended final AsyncResponse response) {
> if (current == null) {
> current = response;
> } else {
> throw new IllegalStateException("we shouldnt go here
> back since");
> }
> }
> 
> @POST
> @Path("answer")
> public void async(final String response) {
> current.resume(response /* response content */); // spec
> doesnt mandate a new thread here but tomcat does
> }
> }
> 
> So we have 2 methods:
> 1) GET: this initiate a request. JAXRS implementation uses servlet
> container to get an AsyncContext no more
> 2) POST: the JAXRS AsyncResponse#resume method will just call servlet
> AsyncContext#dispatch
> 
> Issue is:dispatch is called in the ThreadLocal environment/context of
> POST request so resume/dispatch inherit from it. Finally when you go
> to the async dispatch in Coyoterequest you have a marker bound in
> ContainerThreadMarker (the POST one) so resume/dispatch is ignored but
> actually it should work.
> 
> Is it clearer?

Not really for me. The description is assuming a familiarity with JAXRS2
that I don't have. Reading between the lines of what you have written I
think I have found a problem but I am not sure it is the problem you are
trying to describe.

Consider the following which is described purely in terms of Servlet async:

The first HTTP request (Req1) calls startAsync which creates the
AsyncContext (AC1), stashes AC1 somewhere and then returns.

The client then waits for the response (Res1).


Some time later (but before the AsyncContext and client read timeout) a
new HTTP request (Req2) retrieves the AsyncContext and calls dispatch().

This dispatch() *always* needs to be on a new container thread because
the current container thread is processing Req2/Res2 and the dispatch is
for Req1/Res1.

The bug is the test introduced in r1594198 is that the dispatch() was
processed in the context of Req2/Res2.


Note in all of the above I am ignoring how/where the AsyncContext is
stashed and retrieved.


I think I can put together a test case for the above. If this is the
problem you are seeing then the patch should be fairly easy. The part
that will take the time is reviewing the other Async states affected by
r1594198 to determine if the same problem might occur for any of them.

Mark


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



svn commit: r1658948 - /tomcat/trunk/java/org/apache/coyote/AsyncContextCallback.java

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 13:04:00 2015
New Revision: 1658948

URL: http://svn.apache.org/r1658948
Log:
Fix Javadoc error

Modified:
tomcat/trunk/java/org/apache/coyote/AsyncContextCallback.java

Modified: tomcat/trunk/java/org/apache/coyote/AsyncContextCallback.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncContextCallback.java?rev=1658948&r1=1658947&r2=1658948&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncContextCallback.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncContextCallback.java Wed Feb 11 
13:04:00 2015
@@ -21,7 +21,7 @@ package org.apache.coyote;
  * {@link javax.servlet.AsyncContext} implementation that an action, such as
  * firing event listeners needs to be taken. It is implemented in this manner
  * so that the org.apache.coyote package does not have a dependency on the
- * org.apache.coyote package.
+ * org.apache.catalina package.
  */
 public interface AsyncContextCallback {
 public void fireOnComplete();



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



Re: Hi

2015-02-11 Thread Pravallika Peddi
Thanks for your guidance in this Mark and Chris.

 Hope my first fix will be accepted.

On Wed, Feb 11, 2015 at 5:16 PM, Mark Thomas  wrote:

> On 11/02/2015 11:32, Pravallika Peddi wrote:
> > Hi Mark,
> >
> > I have created the patch file as you mentioned and attached it to the bug
> > report, i would like to confirm on one thing:
> >
> > I have added two new strings to the LocalStrings.properties file which
> has
> > Locale specific strings. Some one has to help to add the new strings to
> the
> > other Locale files like Japaneese, france, etc...
>
> Don't worry about those. They can be completed later.
>
> > Another query is:  When can i mark the issue as RESOLVED?
>
> You don't. A committer will mark this issue as fixed once they have
> review and applied your patch.
>
> > and who will verify my patch to make sure it is working?
>
> This is the responsibility of the committer who commits the patch.
>
> > From my side i verified the fix.
>
> Great.
>
> One of the committers will look at this shortly.
>
> Mark
>
>
> >
> > On Wed, Feb 11, 2015 at 2:43 PM, Mark Thomas  wrote:
> >
> >> On 11/02/2015 06:25, Pravallika Peddi wrote:
> >>> Hi Mark,
> >>> Attached the fix details.
> >>
> >> Patches should be in diff -u format and attached to the bug report to
> >> which they relate.
> >>
> >> Mark
> >>
> >>
> >>> I have modified AprLifecycleListener.java and Library.java to fix the
> >>> issue. Added a new file "LibraryNotFoundError.java" in
> >>> "org.apache.tomcat.jni" package. Added two new strings in
> >>> "LocalStrings.properties" file located in "org.apache.catalina.core"
> >>> package. I do not know the other languages so did not add the new
> >>> strings in other property files.
> >>>
> >>>
> >>> I tested the fix and attached the log files as well.
> >>> I provided the fix based on the comments provided in the issue.
> >>>
> >>> I did not implement the 3rd point(C) yet as i did not feel it so
> >>> important. Let me know if it is required so that i can fix the third
> >>> point too.
> >>>
> >>> Please validate the fix so that i can commit to svn.
> >>>
> >>> Thanks,
> >>> VIN
> >>>
> >>> On Tue, Feb 10, 2015 at 5:15 PM, Pravallika Peddi
> >>> mailto:reachme.va...@gmail.com>> wrote:
> >>>
> >>> Got you Mark.
> >>> Now i am able to reproduce the problem by keeping I64 bit dll in
> x64
> >>> bit windows platform.
> >>> I will fix it and let you know.
> >>>
> >>> Thanks,
> >>> VIN
> >>>
> >>> On Tue, Feb 10, 2015 at 2:19 PM, Mark Thomas  >>> > wrote:
> >>>
> >>> On 10/02/2015 06:28, Pravallika Peddi wrote:
> >>> > Thanks Chris for the information.
> >>> >
> >>> > Mark & Chris:
> >>> > I have gone through one of the issues given by Mark:
> >>> >
> >>> > https://issues.apache.org/bugzilla/show_bug.cgi?id=57021
> >>> >
> >>> > and found that this issue is fixed already.
> >>> >
> >>> > Steps i performed:
> >>> > 1) Download Tomcat 6.0 - 32 bit version and run it on 32-bit
> >> Windows
> >>> > platform. Tomcat Server started successfully using commands
> >> mentioned in
> >>> > issue. Stop the tomcat. Check the catalina.out folder and it
> >> has no
> >>> > error messages. Rename catalina.out file.
> >>> >
> >>> > 2) Download Tomcat 6.0-64 bit version and extract
> tcnative-dll
> >> and copy
> >>> > it on to 32-bit Tomcat folder. Start the Tomcat Server and
> >> check the
> >>> > catalina.out file. It has proper error message "Feb 10, 2015
> >> 11:42:54 AM
> >>> > org.apache.catalina.core.AprLifecycleListener init
> >>> > INFO: The APR based Apache Tomcat Native library which allows
> >> optimal
> >>> > performance in production environments was not found on the
> >>> > java.library.path:"
> >>> >
> >>> > and i did not observe any error in command line as mentioned
> >> in the issue.
> >>> >
> >>> > I attached both the catalina.out files for your reference.
> >>> > Even i checked the recent Trunk AppLifecycleListener.init()
> >> java method
> >>> > and did not find the source code that was mentioned in the
> >> issue.
> >>> >
> >>> > Hence i feel the issue is fixed.
> >>> > Please confirm so that i will close the issue.
> >>>
> >>> The issue is not fixed. Tomcat isn't finding the tc-native
> >>> library so
> >>> the error isn't triggering.
> >>>
> >>> Mark
> >>>
> >>>
> >>  -
> >>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> >>> 
> >>> For additional commands, e-mail: dev-h...@tomcat.apache.org
> >>> 
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --

svn commit: r1658940 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ELParser.java java/org/apache/jasper/compiler/Parser.java test/org/apache/jasper/compiler/TestELParser.java test/org

2015-02-11 Thread markt
Author: markt
Date: Wed Feb 11 12:03:18 2015
New Revision: 1658940

URL: http://svn.apache.org/r1658940
Log:
Follow-up to r1658351.
Back-port additional patch required to complete this fix.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 11 12:03:18 2015
@@ -1,2 +1,2 @@
 
/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1647030,1647043,1648816,1651420-1651422,1651844,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1655109,1655112,1655114-1655115,1655117,1655120,1655445,1655467,1656300,1657049,1657356,1657360,1657370,1657460,1657908,1658208,1658737,1658801-1658803,1658811,1658834
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 
498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346365,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1352056,1352059,1
 
352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,1353501,1353581,1353708,1354137,1354170,1354197,1354255,1354362,1354375,1354469,1354664,1354685,1354817,1354847,1354856,1355726,1355810,1356006-1356007,1356014,1356045,1356125,1356422,1356505,1356898,1357042,1357401,1357407,1358586,1358590,1358612-1358613,1359102,1359340,1359981,1360059,1360455,1360460,

Re: Hi

2015-02-11 Thread Mark Thomas
On 11/02/2015 11:32, Pravallika Peddi wrote:
> Hi Mark,
> 
> I have created the patch file as you mentioned and attached it to the bug
> report, i would like to confirm on one thing:
> 
> I have added two new strings to the LocalStrings.properties file which has
> Locale specific strings. Some one has to help to add the new strings to the
> other Locale files like Japaneese, france, etc...

Don't worry about those. They can be completed later.

> Another query is:  When can i mark the issue as RESOLVED?

You don't. A committer will mark this issue as fixed once they have
review and applied your patch.

> and who will verify my patch to make sure it is working?

This is the responsibility of the committer who commits the patch.

> From my side i verified the fix.

Great.

One of the committers will look at this shortly.

Mark


> 
> On Wed, Feb 11, 2015 at 2:43 PM, Mark Thomas  wrote:
> 
>> On 11/02/2015 06:25, Pravallika Peddi wrote:
>>> Hi Mark,
>>> Attached the fix details.
>>
>> Patches should be in diff -u format and attached to the bug report to
>> which they relate.
>>
>> Mark
>>
>>
>>> I have modified AprLifecycleListener.java and Library.java to fix the
>>> issue. Added a new file "LibraryNotFoundError.java" in
>>> "org.apache.tomcat.jni" package. Added two new strings in
>>> "LocalStrings.properties" file located in "org.apache.catalina.core"
>>> package. I do not know the other languages so did not add the new
>>> strings in other property files.
>>>
>>>
>>> I tested the fix and attached the log files as well.
>>> I provided the fix based on the comments provided in the issue.
>>>
>>> I did not implement the 3rd point(C) yet as i did not feel it so
>>> important. Let me know if it is required so that i can fix the third
>>> point too.
>>>
>>> Please validate the fix so that i can commit to svn.
>>>
>>> Thanks,
>>> VIN
>>>
>>> On Tue, Feb 10, 2015 at 5:15 PM, Pravallika Peddi
>>> mailto:reachme.va...@gmail.com>> wrote:
>>>
>>> Got you Mark.
>>> Now i am able to reproduce the problem by keeping I64 bit dll in x64
>>> bit windows platform.
>>> I will fix it and let you know.
>>>
>>> Thanks,
>>> VIN
>>>
>>> On Tue, Feb 10, 2015 at 2:19 PM, Mark Thomas >> > wrote:
>>>
>>> On 10/02/2015 06:28, Pravallika Peddi wrote:
>>> > Thanks Chris for the information.
>>> >
>>> > Mark & Chris:
>>> > I have gone through one of the issues given by Mark:
>>> >
>>> > https://issues.apache.org/bugzilla/show_bug.cgi?id=57021
>>> >
>>> > and found that this issue is fixed already.
>>> >
>>> > Steps i performed:
>>> > 1) Download Tomcat 6.0 - 32 bit version and run it on 32-bit
>> Windows
>>> > platform. Tomcat Server started successfully using commands
>> mentioned in
>>> > issue. Stop the tomcat. Check the catalina.out folder and it
>> has no
>>> > error messages. Rename catalina.out file.
>>> >
>>> > 2) Download Tomcat 6.0-64 bit version and extract tcnative-dll
>> and copy
>>> > it on to 32-bit Tomcat folder. Start the Tomcat Server and
>> check the
>>> > catalina.out file. It has proper error message "Feb 10, 2015
>> 11:42:54 AM
>>> > org.apache.catalina.core.AprLifecycleListener init
>>> > INFO: The APR based Apache Tomcat Native library which allows
>> optimal
>>> > performance in production environments was not found on the
>>> > java.library.path:"
>>> >
>>> > and i did not observe any error in command line as mentioned
>> in the issue.
>>> >
>>> > I attached both the catalina.out files for your reference.
>>> > Even i checked the recent Trunk AppLifecycleListener.init()
>> java method
>>> > and did not find the source code that was mentioned in the
>> issue.
>>> >
>>> > Hence i feel the issue is fixed.
>>> > Please confirm so that i will close the issue.
>>>
>>> The issue is not fixed. Tomcat isn't finding the tc-native
>>> library so
>>> the error isn't triggering.
>>>
>>> Mark
>>>
>>>
>>  -
>>> 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
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>
>>
> 


-

[Bug 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

--- Comment #3 from VIN  ---
Sorry, I could not attach the log files. This portal is not allowing me to
attach the logs which are generated with the fix.

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

2015-02-11 Thread Pravallika Peddi
Hi Mark,

I have created the patch file as you mentioned and attached it to the bug
report, i would like to confirm on one thing:

I have added two new strings to the LocalStrings.properties file which has
Locale specific strings. Some one has to help to add the new strings to the
other Locale files like Japaneese, france, etc...

Another query is:  When can i mark the issue as RESOLVED? and who will
verify my patch to make sure it is working? From my side i verified the fix.

On Wed, Feb 11, 2015 at 2:43 PM, Mark Thomas  wrote:

> On 11/02/2015 06:25, Pravallika Peddi wrote:
> > Hi Mark,
> > Attached the fix details.
>
> Patches should be in diff -u format and attached to the bug report to
> which they relate.
>
> Mark
>
>
> > I have modified AprLifecycleListener.java and Library.java to fix the
> > issue. Added a new file "LibraryNotFoundError.java" in
> > "org.apache.tomcat.jni" package. Added two new strings in
> > "LocalStrings.properties" file located in "org.apache.catalina.core"
> > package. I do not know the other languages so did not add the new
> > strings in other property files.
> >
> >
> > I tested the fix and attached the log files as well.
> > I provided the fix based on the comments provided in the issue.
> >
> > I did not implement the 3rd point(C) yet as i did not feel it so
> > important. Let me know if it is required so that i can fix the third
> > point too.
> >
> > Please validate the fix so that i can commit to svn.
> >
> > Thanks,
> > VIN
> >
> > On Tue, Feb 10, 2015 at 5:15 PM, Pravallika Peddi
> > mailto:reachme.va...@gmail.com>> wrote:
> >
> > Got you Mark.
> > Now i am able to reproduce the problem by keeping I64 bit dll in x64
> > bit windows platform.
> > I will fix it and let you know.
> >
> > Thanks,
> > VIN
> >
> > On Tue, Feb 10, 2015 at 2:19 PM, Mark Thomas  > > wrote:
> >
> > On 10/02/2015 06:28, Pravallika Peddi wrote:
> > > Thanks Chris for the information.
> > >
> > > Mark & Chris:
> > > I have gone through one of the issues given by Mark:
> > >
> > > https://issues.apache.org/bugzilla/show_bug.cgi?id=57021
> > >
> > > and found that this issue is fixed already.
> > >
> > > Steps i performed:
> > > 1) Download Tomcat 6.0 - 32 bit version and run it on 32-bit
> Windows
> > > platform. Tomcat Server started successfully using commands
> mentioned in
> > > issue. Stop the tomcat. Check the catalina.out folder and it
> has no
> > > error messages. Rename catalina.out file.
> > >
> > > 2) Download Tomcat 6.0-64 bit version and extract tcnative-dll
> and copy
> > > it on to 32-bit Tomcat folder. Start the Tomcat Server and
> check the
> > > catalina.out file. It has proper error message "Feb 10, 2015
> 11:42:54 AM
> > > org.apache.catalina.core.AprLifecycleListener init
> > > INFO: The APR based Apache Tomcat Native library which allows
> optimal
> > > performance in production environments was not found on the
> > > java.library.path:"
> > >
> > > and i did not observe any error in command line as mentioned
> in the issue.
> > >
> > > I attached both the catalina.out files for your reference.
> > > Even i checked the recent Trunk AppLifecycleListener.init()
> java method
> > > and did not find the source code that was mentioned in the
> issue.
> > >
> > > Hence i feel the issue is fixed.
> > > Please confirm so that i will close the issue.
> >
> > The issue is not fixed. Tomcat isn't finding the tc-native
> > library so
> > the error isn't triggering.
> >
> > Mark
> >
> >
>  -
> > 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
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[Bug 57021] Improve logging in AprLifecycleListener and jni.Library when Tomcat-Native DLL fails to load

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57021

VIN  changed:

   What|Removed |Added

 CC||reachme.va...@gmail.com

--- Comment #2 from VIN  ---
Created attachment 32453
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32453&action=edit
The attached patch has fixes for both A and B points.

I have modified AprLifecycleListener.java and Library.java to fix the issue.
Added a new file "LibraryNotFoundError.java" in  "org.apache.tomcat.jni"
package. Added two new strings in "LocalStrings.properties" file located in
"org.apache.catalina.core" package. 
I do not know the Locale languages like Japaneese and French, so did not add
the new strings in other Locale property files.


I tested the fix and attached the log files as well.
I provided the fix based on the comments provided in the issue.

I did not implement the 3rd point(C) yet.

-- 
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: async and thread constraint

2015-02-11 Thread Romain Manni-Bucau
Ok, let's look a jaxrs 2 sample and bind underlying implementation:

@Path("touch")
@ApplicationScoped
public class Endpoint {
private volatile AsyncResponse current;

@GET
public void async(@Suspended final AsyncResponse response) {
if (current == null) {
current = response;
} else {
throw new IllegalStateException("we shouldnt go here
back since");
}
}

@POST
@Path("answer")
public void async(final String response) {
current.resume(response /* response content */); // spec
doesnt mandate a new thread here but tomcat does
}
}

So we have 2 methods:
1) GET: this initiate a request. JAXRS implementation uses servlet
container to get an AsyncContext no more
2) POST: the JAXRS AsyncResponse#resume method will just call servlet
AsyncContext#dispatch

Issue is:dispatch is called in the ThreadLocal environment/context of
POST request so resume/dispatch inherit from it. Finally when you go
to the async dispatch in Coyoterequest you have a marker bound in
ContainerThreadMarker (the POST one) so resume/dispatch is ignored but
actually it should work.

is it clearer? if not I can dump some stacks to make the calls more concrete



Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 10:30 GMT+01:00 Mark Thomas :
> On 11/02/2015 09:21, Romain Manni-Bucau wrote:
>> Well it is not different and both should be allowed IMO, i just tried
>> to find a solution for the original bug without breaking common
>> usages. It should be easy to reproduce with a servlet: GET
>> /foo?start=true -> create an async context then GET
>> /foo?continuer=true -> resume without popping a new thread. nothing
>> will happen.
>>
>> Well said otherwise: why tomcat is preventing to continue a request in
>> a container thread? If this is for an internal reason (issue
>> mentionned by Konstantin) then it is a bug.
>>
>> Point is ATM this feature doesn't work and AFAIK it is not fobidden by the 
>> spec.
>>
>> Another point is startAsync works but you reuse container pool (so
>> previous issue sounds really like a bug). startAsync works cause the
>> context (this marker flag) is generally different (not set) when you
>> call it.
>
> Sorry. I don't follow the point you are trying to make at all. You need
> to explain clearly - to folks who have no idea what JAXRS 2 is trying to
> do - what the problem is and why (ideally with reference to the Servlet
> specification) you think there is a bug in Tomcat.
>
> Mark
>
>
>>
>>
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-02-11 10:15 GMT+01:00 Mark Thomas :
>>> On 11/02/2015 07:58, Romain Manni-Bucau wrote:
 Well in two words if you take the most common example of JAXRS 2
 continuation (@Suspended) it will do it (doing the link with
 servlets):

 -> request 1 -> suspend async context
 -> request 2 -> async context dispatch (resume)

 issue is that resume is called from request 2. In other words
 ContainerThreadMarker should check current thread id and not just a
 boolean cause request 2 is in a container thread but this is not
 request 1 thread so you can do request 1 async operations in it.

 wdyt? hope it is clearer
>>>
>>> Nope. I still don't see what the problem is or why forcing a dispatch to
>>> a different container thread is any different to continuing to execute
>>> on the current container thread.
>>>
>>> Mark
>>>
>>>



 Romain Manni-Bucau
 @rmannibucau
 http://www.tomitribe.com
 http://rmannibucau.wordpress.com
 https://github.com/rmannibucau


 2015-02-11 0:16 GMT+01:00 Mark Thomas :
> On 10/02/2015 23:06, Konstantin Kolinko wrote:
>> 2015-02-10 14:16 GMT+03:00 Romain Manni-Bucau :
>>> Hi guys,
>>>
>>> in org.apache.coyote.AsyncStateMachine#asyncDispatch tomcat checks
>>> ContainerThreadMarker.isContainerThread()
>>>
>>> basically it prevents to use JAXRS 2 @Suspended without creating
>>> custom threads - which is not intended.
>>
>> I do not know what the above is about.
>
> Me neither.
>
>>> Was this limitation intended or just to try to avoid to consume
>>> container threads?
>
> In addition to the reason Konstantin explains below, it is also a
> performance benefit. If we are already on a container thread and need to
> process a dispatch() it is much more efficient to stay on that container
> thread to process the dispatch() than it is to return the current
> container thread to the pool, monkey about with the poller (or
> equivalent for the connector in question) to trigger an event, wait for
> the event to fire and poller to allocate the socket to a conta

Re: async and thread constraint

2015-02-11 Thread Rémy Maucherat
2015-02-11 10:15 GMT+01:00 Mark Thomas :

> On 11/02/2015 07:58, Romain Manni-Bucau wrote:
> > Well in two words if you take the most common example of JAXRS 2
> > continuation (@Suspended) it will do it (doing the link with
> > servlets):
> >
> > -> request 1 -> suspend async context
> > -> request 2 -> async context dispatch (resume)
> >
> > issue is that resume is called from request 2. In other words
> > ContainerThreadMarker should check current thread id and not just a
> > boolean cause request 2 is in a container thread but this is not
> > request 1 thread so you can do request 1 async operations in it.
> >
> > wdyt? hope it is clearer
>
> Nope. I still don't see what the problem is or why forcing a dispatch to
> a different container thread is any different to continuing to execute
> on the current container thread.
>
>
> +1, that looks good enough to me as well so far.

Rémy


Re: async and thread constraint

2015-02-11 Thread Mark Thomas
On 11/02/2015 09:21, Romain Manni-Bucau wrote:
> Well it is not different and both should be allowed IMO, i just tried
> to find a solution for the original bug without breaking common
> usages. It should be easy to reproduce with a servlet: GET
> /foo?start=true -> create an async context then GET
> /foo?continuer=true -> resume without popping a new thread. nothing
> will happen.
> 
> Well said otherwise: why tomcat is preventing to continue a request in
> a container thread? If this is for an internal reason (issue
> mentionned by Konstantin) then it is a bug.
> 
> Point is ATM this feature doesn't work and AFAIK it is not fobidden by the 
> spec.
> 
> Another point is startAsync works but you reuse container pool (so
> previous issue sounds really like a bug). startAsync works cause the
> context (this marker flag) is generally different (not set) when you
> call it.

Sorry. I don't follow the point you are trying to make at all. You need
to explain clearly - to folks who have no idea what JAXRS 2 is trying to
do - what the problem is and why (ideally with reference to the Servlet
specification) you think there is a bug in Tomcat.

Mark


> 
> 
> 
> 
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
> 
> 
> 2015-02-11 10:15 GMT+01:00 Mark Thomas :
>> On 11/02/2015 07:58, Romain Manni-Bucau wrote:
>>> Well in two words if you take the most common example of JAXRS 2
>>> continuation (@Suspended) it will do it (doing the link with
>>> servlets):
>>>
>>> -> request 1 -> suspend async context
>>> -> request 2 -> async context dispatch (resume)
>>>
>>> issue is that resume is called from request 2. In other words
>>> ContainerThreadMarker should check current thread id and not just a
>>> boolean cause request 2 is in a container thread but this is not
>>> request 1 thread so you can do request 1 async operations in it.
>>>
>>> wdyt? hope it is clearer
>>
>> Nope. I still don't see what the problem is or why forcing a dispatch to
>> a different container thread is any different to continuing to execute
>> on the current container thread.
>>
>> Mark
>>
>>
>>>
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau
>>> http://www.tomitribe.com
>>> http://rmannibucau.wordpress.com
>>> https://github.com/rmannibucau
>>>
>>>
>>> 2015-02-11 0:16 GMT+01:00 Mark Thomas :
 On 10/02/2015 23:06, Konstantin Kolinko wrote:
> 2015-02-10 14:16 GMT+03:00 Romain Manni-Bucau :
>> Hi guys,
>>
>> in org.apache.coyote.AsyncStateMachine#asyncDispatch tomcat checks
>> ContainerThreadMarker.isContainerThread()
>>
>> basically it prevents to use JAXRS 2 @Suspended without creating
>> custom threads - which is not intended.
>
> I do not know what the above is about.

 Me neither.

>> Was this limitation intended or just to try to avoid to consume
>> container threads?

 In addition to the reason Konstantin explains below, it is also a
 performance benefit. If we are already on a container thread and need to
 process a dispatch() it is much more efficient to stay on that container
 thread to process the dispatch() than it is to return the current
 container thread to the pool, monkey about with the poller (or
 equivalent for the connector in question) to trigger an event, wait for
 the event to fire and poller to allocate the socket to a container
 thread and then process the dispatch.

 Mark


>
> Looking at blame results, those lines were added in
> http://svn.apache.org/r1594198
> "Address root cause of ReadPendingException rather than swallowing it."
>
> Discussion that preceded that commit is in "Re:r1593303" thread,
> http://tomcat.markmail.org/thread/4kwnhzwhhxi43sob
>
> 
> I think I have got to the bottom of this. An async dispatch always
> adds the socket to the poller but if the dispatch occurs on a
> container thread then it will also be added to the poller when that
> thread exits the AbstractConnectionHandler.process() method.
>
> This looks like a bug with all the connectors but one that is more
> obvious with Nio2 because it triggers the ReadPendingException. Fixing
> this bug highlighted a minor issue on shutdown. I have a fix for that
> too. Commits to follow shortly.
> 
>
> 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

>>>
>>> -
>>> To unsubscribe, e-mail: dev-un

[Bug 57546] Memory Leak in SecureNioChannel

2015-02-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=57546

--- Comment #9 from Mark Thomas  ---
See r1658734 and r1658790.

-- 
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: async and thread constraint

2015-02-11 Thread Romain Manni-Bucau
Well it is not different and both should be allowed IMO, i just tried
to find a solution for the original bug without breaking common
usages. It should be easy to reproduce with a servlet: GET
/foo?start=true -> create an async context then GET
/foo?continuer=true -> resume without popping a new thread. nothing
will happen.

Well said otherwise: why tomcat is preventing to continue a request in
a container thread? If this is for an internal reason (issue
mentionned by Konstantin) then it is a bug.

Point is ATM this feature doesn't work and AFAIK it is not fobidden by the spec.

Another point is startAsync works but you reuse container pool (so
previous issue sounds really like a bug). startAsync works cause the
context (this marker flag) is generally different (not set) when you
call it.




Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 10:15 GMT+01:00 Mark Thomas :
> On 11/02/2015 07:58, Romain Manni-Bucau wrote:
>> Well in two words if you take the most common example of JAXRS 2
>> continuation (@Suspended) it will do it (doing the link with
>> servlets):
>>
>> -> request 1 -> suspend async context
>> -> request 2 -> async context dispatch (resume)
>>
>> issue is that resume is called from request 2. In other words
>> ContainerThreadMarker should check current thread id and not just a
>> boolean cause request 2 is in a container thread but this is not
>> request 1 thread so you can do request 1 async operations in it.
>>
>> wdyt? hope it is clearer
>
> Nope. I still don't see what the problem is or why forcing a dispatch to
> a different container thread is any different to continuing to execute
> on the current container thread.
>
> Mark
>
>
>>
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-02-11 0:16 GMT+01:00 Mark Thomas :
>>> On 10/02/2015 23:06, Konstantin Kolinko wrote:
 2015-02-10 14:16 GMT+03:00 Romain Manni-Bucau :
> Hi guys,
>
> in org.apache.coyote.AsyncStateMachine#asyncDispatch tomcat checks
> ContainerThreadMarker.isContainerThread()
>
> basically it prevents to use JAXRS 2 @Suspended without creating
> custom threads - which is not intended.

 I do not know what the above is about.
>>>
>>> Me neither.
>>>
> Was this limitation intended or just to try to avoid to consume
> container threads?
>>>
>>> In addition to the reason Konstantin explains below, it is also a
>>> performance benefit. If we are already on a container thread and need to
>>> process a dispatch() it is much more efficient to stay on that container
>>> thread to process the dispatch() than it is to return the current
>>> container thread to the pool, monkey about with the poller (or
>>> equivalent for the connector in question) to trigger an event, wait for
>>> the event to fire and poller to allocate the socket to a container
>>> thread and then process the dispatch.
>>>
>>> Mark
>>>
>>>

 Looking at blame results, those lines were added in
 http://svn.apache.org/r1594198
 "Address root cause of ReadPendingException rather than swallowing it."

 Discussion that preceded that commit is in "Re:r1593303" thread,
 http://tomcat.markmail.org/thread/4kwnhzwhhxi43sob

 
 I think I have got to the bottom of this. An async dispatch always
 adds the socket to the poller but if the dispatch occurs on a
 container thread then it will also be added to the poller when that
 thread exits the AbstractConnectionHandler.process() method.

 This looks like a bug with all the connectors but one that is more
 obvious with Nio2 because it triggers the ReadPendingException. Fixing
 this bug highlighted a minor issue on shutdown. I have a fix for that
 too. Commits to follow shortly.
 

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

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

Re: svn commit: r1658351 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/el/parser/ java/org/apache/jasper/compiler/ test/org/apache/el/ test/webapp-3.0/bug45nnn/ webapps/docs/

2015-02-11 Thread Mark Thomas
On 11/02/2015 00:40, Konstantin Kolinko wrote:
> 2015-02-09 13:30 GMT+03:00  :
>> Author: markt
>> Date: Mon Feb  9 10:30:40 2015
>> New Revision: 1658351
>>
>> URL: http://svn.apache.org/r1658351
>> Log:
>> Ensure only \${ and \#{ are treated as escapes for ${ and #{ rather than \$ 
>> and \# being treated as escapes for $ and # when processing literal 
>> expressions in expression language.
>>
>> Modified:
>> tomcat/tc7.0.x/trunk/   (props changed)
>> tomcat/tc7.0.x/trunk/java/org/apache/el/parser/AstLiteralExpression.java
>> tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java
>> 
>> tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
>> tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java
>> tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java
>> tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java
>> tomcat/tc7.0.x/trunk/test/webapp-3.0/bug45nnn/bug45451.jspf
>> tomcat/tc7.0.x/trunk/test/webapp-3.0/bug45nnn/bug45451d.jspx
>> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>>
> 
> 
> org.apache.jasper.compiler.TestELParser  test is failing on Tomcat 7.

I see failures on the (now fixed) CI build as well.

I'm not sure if this is an error in my back-port or some additional
tests that need to be changed.

I'll take a look.

Mark


> It happens on Gump and I can reproduce it locally.
> Two test cases out of 38 are failing.
> 
> Testsuite: org.apache.jasper.compiler.TestELParser
> Tests run: 38, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0,42 sec
> 
> Testcase: testEscape04 took 0,006 sec
> FAILED
> expected:<[]$> but was:<[\]$>
> junit.framework.AssertionFailedError: expected:<[]$> but was:<[\]$>
> at 
> org.apache.jasper.compiler.TestELParser.doTestParser(TestELParser.java:293)
> at 
> org.apache.jasper.compiler.TestELParser.testEscape04(TestELParser.java:241)
> 
> Testcase: testEscape05 took 0 sec
> FAILED
> expected:<[]#> but was:<[\]#>
> junit.framework.AssertionFailedError: expected:<[]#> but was:<[\]#>
> at 
> org.apache.jasper.compiler.TestELParser.doTestParser(TestELParser.java:293)
> at 
> org.apache.jasper.compiler.TestELParser.testEscape05(TestELParser.java:247)
> 
> 
> 
> Also,
> org.apache.jasper.compiler.TestParser FAILED
> 
> Testsuite: org.apache.jasper.compiler.TestParser
> Tests run: 16, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 15.18 sec
> 
> 
> 
> 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



Re: async and thread constraint

2015-02-11 Thread Mark Thomas
On 11/02/2015 07:58, Romain Manni-Bucau wrote:
> Well in two words if you take the most common example of JAXRS 2
> continuation (@Suspended) it will do it (doing the link with
> servlets):
> 
> -> request 1 -> suspend async context
> -> request 2 -> async context dispatch (resume)
> 
> issue is that resume is called from request 2. In other words
> ContainerThreadMarker should check current thread id and not just a
> boolean cause request 2 is in a container thread but this is not
> request 1 thread so you can do request 1 async operations in it.
> 
> wdyt? hope it is clearer

Nope. I still don't see what the problem is or why forcing a dispatch to
a different container thread is any different to continuing to execute
on the current container thread.

Mark


> 
> 
> 
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
> 
> 
> 2015-02-11 0:16 GMT+01:00 Mark Thomas :
>> On 10/02/2015 23:06, Konstantin Kolinko wrote:
>>> 2015-02-10 14:16 GMT+03:00 Romain Manni-Bucau :
 Hi guys,

 in org.apache.coyote.AsyncStateMachine#asyncDispatch tomcat checks
 ContainerThreadMarker.isContainerThread()

 basically it prevents to use JAXRS 2 @Suspended without creating
 custom threads - which is not intended.
>>>
>>> I do not know what the above is about.
>>
>> Me neither.
>>
 Was this limitation intended or just to try to avoid to consume
 container threads?
>>
>> In addition to the reason Konstantin explains below, it is also a
>> performance benefit. If we are already on a container thread and need to
>> process a dispatch() it is much more efficient to stay on that container
>> thread to process the dispatch() than it is to return the current
>> container thread to the pool, monkey about with the poller (or
>> equivalent for the connector in question) to trigger an event, wait for
>> the event to fire and poller to allocate the socket to a container
>> thread and then process the dispatch.
>>
>> Mark
>>
>>
>>>
>>> Looking at blame results, those lines were added in
>>> http://svn.apache.org/r1594198
>>> "Address root cause of ReadPendingException rather than swallowing it."
>>>
>>> Discussion that preceded that commit is in "Re:r1593303" thread,
>>> http://tomcat.markmail.org/thread/4kwnhzwhhxi43sob
>>>
>>> 
>>> I think I have got to the bottom of this. An async dispatch always
>>> adds the socket to the poller but if the dispatch occurs on a
>>> container thread then it will also be added to the poller when that
>>> thread exits the AbstractConnectionHandler.process() method.
>>>
>>> This looks like a bug with all the connectors but one that is more
>>> obvious with Nio2 because it triggers the ReadPendingException. Fixing
>>> this bug highlighted a minor issue on shutdown. I have a fix for that
>>> too. Commits to follow shortly.
>>> 
>>>
>>> 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
>>
> 
> -
> 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



Re: Hi

2015-02-11 Thread Mark Thomas
On 11/02/2015 06:25, Pravallika Peddi wrote:
> Hi Mark,
> Attached the fix details.

Patches should be in diff -u format and attached to the bug report to
which they relate.

Mark


> I have modified AprLifecycleListener.java and Library.java to fix the
> issue. Added a new file "LibraryNotFoundError.java" in
> "org.apache.tomcat.jni" package. Added two new strings in
> "LocalStrings.properties" file located in "org.apache.catalina.core"
> package. I do not know the other languages so did not add the new
> strings in other property files.
> 
> 
> I tested the fix and attached the log files as well. 
> I provided the fix based on the comments provided in the issue.
> 
> I did not implement the 3rd point(C) yet as i did not feel it so
> important. Let me know if it is required so that i can fix the third
> point too.
> 
> Please validate the fix so that i can commit to svn.
> 
> Thanks,
> VIN
> 
> On Tue, Feb 10, 2015 at 5:15 PM, Pravallika Peddi
> mailto:reachme.va...@gmail.com>> wrote:
> 
> Got you Mark.
> Now i am able to reproduce the problem by keeping I64 bit dll in x64
> bit windows platform.
> I will fix it and let you know.
> 
> Thanks,
> VIN
> 
> On Tue, Feb 10, 2015 at 2:19 PM, Mark Thomas  > wrote:
> 
> On 10/02/2015 06:28, Pravallika Peddi wrote:
> > Thanks Chris for the information.
> >
> > Mark & Chris:
> > I have gone through one of the issues given by Mark:
> >
> > https://issues.apache.org/bugzilla/show_bug.cgi?id=57021
> >
> > and found that this issue is fixed already.
> >
> > Steps i performed:
> > 1) Download Tomcat 6.0 - 32 bit version and run it on 32-bit Windows
> > platform. Tomcat Server started successfully using commands 
> mentioned in
> > issue. Stop the tomcat. Check the catalina.out folder and it has no
> > error messages. Rename catalina.out file.
> >
> > 2) Download Tomcat 6.0-64 bit version and extract tcnative-dll and 
> copy
> > it on to 32-bit Tomcat folder. Start the Tomcat Server and check the
> > catalina.out file. It has proper error message "Feb 10, 2015 
> 11:42:54 AM
> > org.apache.catalina.core.AprLifecycleListener init
> > INFO: The APR based Apache Tomcat Native library which allows 
> optimal
> > performance in production environments was not found on the
> > java.library.path:"
> >
> > and i did not observe any error in command line as mentioned in the 
> issue.
> >
> > I attached both the catalina.out files for your reference.
> > Even i checked the recent Trunk AppLifecycleListener.init() java 
> method
> > and did not find the source code that was mentioned in the issue.
> >
> > Hence i feel the issue is fixed.
> > Please confirm so that i will close the issue.
> 
> The issue is not fixed. Tomcat isn't finding the tc-native
> library so
> the error isn't triggering.
> 
> Mark
> 
> -
> 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
> 


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



Re: async and thread constraint

2015-02-11 Thread Romain Manni-Bucau
Well in two words if you take the most common example of JAXRS 2
continuation (@Suspended) it will do it (doing the link with
servlets):

-> request 1 -> suspend async context
-> request 2 -> async context dispatch (resume)

issue is that resume is called from request 2. In other words
ContainerThreadMarker should check current thread id and not just a
boolean cause request 2 is in a container thread but this is not
request 1 thread so you can do request 1 async operations in it.

wdyt? hope it is clearer



Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-02-11 0:16 GMT+01:00 Mark Thomas :
> On 10/02/2015 23:06, Konstantin Kolinko wrote:
>> 2015-02-10 14:16 GMT+03:00 Romain Manni-Bucau :
>>> Hi guys,
>>>
>>> in org.apache.coyote.AsyncStateMachine#asyncDispatch tomcat checks
>>> ContainerThreadMarker.isContainerThread()
>>>
>>> basically it prevents to use JAXRS 2 @Suspended without creating
>>> custom threads - which is not intended.
>>
>> I do not know what the above is about.
>
> Me neither.
>
>>> Was this limitation intended or just to try to avoid to consume
>>> container threads?
>
> In addition to the reason Konstantin explains below, it is also a
> performance benefit. If we are already on a container thread and need to
> process a dispatch() it is much more efficient to stay on that container
> thread to process the dispatch() than it is to return the current
> container thread to the pool, monkey about with the poller (or
> equivalent for the connector in question) to trigger an event, wait for
> the event to fire and poller to allocate the socket to a container
> thread and then process the dispatch.
>
> Mark
>
>
>>
>> Looking at blame results, those lines were added in
>> http://svn.apache.org/r1594198
>> "Address root cause of ReadPendingException rather than swallowing it."
>>
>> Discussion that preceded that commit is in "Re:r1593303" thread,
>> http://tomcat.markmail.org/thread/4kwnhzwhhxi43sob
>>
>> 
>> I think I have got to the bottom of this. An async dispatch always
>> adds the socket to the poller but if the dispatch occurs on a
>> container thread then it will also be added to the poller when that
>> thread exits the AbstractConnectionHandler.process() method.
>>
>> This looks like a bug with all the connectors but one that is more
>> obvious with Nio2 because it triggers the ReadPendingException. Fixing
>> this bug highlighted a minor issue on shutdown. I have a fix for that
>> too. Commits to follow shortly.
>> 
>>
>> 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
>

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