svn commit: r1535664 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2013-10-25 Thread violetagg
Author: violetagg
Date: Fri Oct 25 09:33:49 2013
New Revision: 1535664

URL: http://svn.apache.org/r1535664
Log:
Add release date for 7.0.47

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

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1535664r1=1535663r2=1535664view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct 25 09:33:49 2013
@@ -114,7 +114,7 @@
 /changelog
   /subsection
 /section
-section name=Tomcat 7.0.47 (violetagg)
+section name=Tomcat 7.0.47 (violetagg) rtext=2013-10-24
   subsection name=Coyote
 changelog
   fix



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



[Bug 55702] New: TLD cannot be loaded if CATALINA_HOME contains spaces

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55702

Bug ID: 55702
   Summary: TLD cannot be loaded if CATALINA_HOME contains spaces
   Product: Tomcat 8
   Version: 8.0.0-RC5
  Hardware: PC
Status: NEW
  Severity: regression
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: steffen.r...@iteratec.de

A web application containing an own TLD within its WEB-INF directory fails to
render a JSP page referencing that TLD if Tomcat it installed into a directory
with spaces in the path, such as C:\Program Files\ 
After moving the entire Tomcat installation directory to a path without spaces
(such as C:\1\Tomcat8), the application can render that same JSP page.

Following stacktrace is printed. Note the %20 in the file path

org.apache.jasper.JasperException: /jsp/layouts/standard.jsp (line: 7, column:
69) File
file:/C:/Program%20Files/Apache/Tomcat-8.0.0-RC5/webapps/mywebapp/WEB-INF/tlds/mywebapp-tags.tld
not found
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
   
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:276)
   
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:92)
   
org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:166)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1451)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
   
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
   
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:606)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


Java version used: Oracle JDK 7 Update 45 (64 Bit)
Active Tomcat connector: [http-nio-8080]

-- 
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 55702] TLD cannot be loaded if CATALINA_HOME contains spaces

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55702

Steffen Ryll steffen.r...@iteratec.de changed:

   What|Removed |Added

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



buildbot success in ASF Buildbot on tomcat-7-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot




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



svn commit: r1535672 [2/11] - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/ apidocs/org/apache/tomcat/maven/common/deployer/ apidocs/org/apache/tomcat/maven/common/deployer/class-use/ api

2013-10-25 Thread olamy
Modified: 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.html?rev=1535672r1=1535671r2=1535672view=diff
==
--- 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.html
 (original)
+++ 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.html
 Fri Oct 25 10:37:15 2013
@@ -134,7 +134,7 @@ Abstract goal that provides common confi
 TH ALIGN=leftBFields inherited from class 
org.apache.tomcat.maven.plugin.tomcat7.A 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html
 title=class in 
org.apache.tomcat.maven.plugin.tomcat7AbstractTomcat7Mojo/A/B/TH
 /TR
 TR BGCOLOR=white CLASS=TableRowColor
-TDCODEA 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html#messagesProvidermessagesProvider/A,
 A 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html#pathpath/A/CODE/TD
+TDCODEA 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html#messagesProvidermessagesProvider/A,
 A 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html#pathpath/A,
 A 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html#settingssettings/A/CODE/TD
 /TR
 /TABLE
 nbsp;A NAME=fields_inherited_from_class_org.apache.maven.plugin.Mojo!-- 
--/A

Modified: 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html?rev=1535672r1=1535671r2=1535672view=diff
==
--- 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html
 (original)
+++ 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html
 Fri Oct 25 10:37:15 2013
@@ -140,6 +140,14 @@ Class AbstractTomcat7Mojo/H2
 BR
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;The webapp context 
path to use for the web application being run./TD
 /TR
+TR BGCOLOR=white CLASS=TableRowColor
+TD ALIGN=right VALIGN=top WIDTH=1%FONT SIZE=-1
+CODEprotected nbsp;A 
HREF=http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/maven.settings.Settings.html?is-external=true;
 title=class or interface in 
org.apacheorg.apache.maven.settings.Settings/A/CODE/FONT/TD
+TDCODEBA 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html#settingssettings/A/B/CODE
+
+BR
+nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/TD
+/TR
 /TABLE
 nbsp;A NAME=fields_inherited_from_class_org.apache.maven.plugin.Mojo!-- 
--/A
 TABLE BORDER=1 WIDTH=100% CELLPADDING=3 CELLSPACING=0 SUMMARY=
@@ -232,6 +240,17 @@ Class AbstractTomcat7Mojo/H2
 /TR
 /TABLE
 
+A NAME=settings!-- --/AH3
+settings/H3
+PRE
+FONT SIZE=-1A 
HREF=http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/maven.plugins.annotations.Component.html?is-external=true;
 title=class or interface in org.apache@Component/A
+/FONTprotected A 
HREF=http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/maven.settings.Settings.html?is-external=true;
 title=class or interface in 
org.apacheorg.apache.maven.settings.Settings/A Bsettings/B/PRE
+DL
+DL
+/DL
+/DL
+HR
+
 A NAME=messagesProvider!-- --/AH3
 messagesProvider/H3
 PRE

Modified: 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractWarCatalinaMojo.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractWarCatalinaMojo.html?rev=1535672r1=1535671r2=1535672view=diff
==
--- 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractWarCatalinaMojo.html
 (original)
+++ 
tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/AbstractWarCatalinaMojo.html
 Fri Oct 25 10:37:15 2013
@@ -135,7 +135,7 @@ Abstract goal that provides common confi
 TH ALIGN=leftBFields inherited from class 
org.apache.tomcat.maven.plugin.tomcat7.A 
HREF=../../../../../../org/apache/tomcat/maven/plugin/tomcat7/AbstractTomcat7Mojo.html
 title=class in 
org.apache.tomcat.maven.plugin.tomcat7AbstractTomcat7Mojo/A/B/TH
 /TR
 TR BGCOLOR=white CLASS=TableRowColor
-TDCODEA 

svn commit: r1535672 [4/11] - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/ apidocs/org/apache/tomcat/maven/common/deployer/ apidocs/org/apache/tomcat/maven/common/deployer/class-use/ api

2013-10-25 Thread olamy
Modified: 
tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-convergence.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-convergence.html?rev=1535672r1=1535671r2=1535672view=diff
==
--- 
tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-convergence.html
 (original)
+++ 
tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-convergence.html
 Fri Oct 25 10:37:15 2013
@@ -7,7 +7,7 @@
   head
 meta charset=UTF-8 /
 meta name=viewport content=width=device-width, initial-scale=1.0 /
-meta name=Date-Revision-mmdd content=20131021 /
+meta name=Date-Revision-mmdd content=20131025 /
 meta http-equiv=Content-Language content=en /
 titleApache Tomcat Maven Plugin :: Common API - Reactor Dependency 
Convergence/title
 link rel=stylesheet 
href=./css/apache-maven-fluido-1.3.1-SNAPSHOT.min.css /
@@ -158,7 +158,7 @@
 
 
 
-  li id=publishDate class=pull-rightspan 
class=divider|/span Last Published: 21 October 2013/li
+  li id=publishDate class=pull-rightspan 
class=divider|/span Last Published: 25 October 2013/li
   li id=projectVersion class=pull-right
 Version: 2.2-SNAPSHOT
 /li
@@ -468,7 +468,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/common-tomcat-maven-plugin;org.apache.tomcat.maven:common-tomcat-maven-plugin/a/li
@@ -482,7 +482,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/common-tomcat-maven-plugin;org.apache.tomcat.maven:common-tomcat-maven-plugin/a/li
@@ -495,7 +495,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li/ol/td/tr/table/td/tr/table/div
@@ -653,7 +653,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -666,7 +666,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -679,7 +679,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/common-tomcat-maven-plugin;org.apache.tomcat.maven:common-tomcat-maven-plugin/a/li
@@ -693,7 +693,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -706,7 +706,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -719,7 +719,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -732,7 +732,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -745,7 +745,7 @@
 td
 table border=0 class=table table-striped
 tr class=b
-td width=25%7.0.42/td
+td width=25%7.0.47/td
 td
 ol style=list-style-type: lower-alpha
 lia class=externalLink 
href=http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin;org.apache.tomcat.maven:tomcat7-maven-plugin/a/li
@@ -758,7 +758,7 @@
 td
 table

[Bug 55696] mod_jk crash in jk_map_get_int()

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55696

--- Comment #11 from Konstantin Kolinko knst.koli...@gmail.com ---
(In reply to Christopher Schultz from comment #10)

Looks good.

Some style comments
1. Beware tabs. This line is formatted oddly because it has a tab character:
 + lastchar = buf + len - 1;

2. 
 +int multit = 1;

Can be moved several lines below into the if(len) block.

Or definition of char buf[100]; could be moved up just below that line. (see
below).

3.
 +strncpy(buf, rc, 100);

s/100/sizeof(buf)/ ?

4. strncpy is not a safe function. It the string is longer than 100 characters
it will truncate it without setting a 0 byte at the end.

Thus in other places it is actually strncpy(..., size-1), and it needs some
code to explicitly set the size'th byte of the buffer to 0.

Moreover, you are not recalculating len after copying thus if len  100, the
lastchar pointer will point to some place outside the buffer:

 + lastchar = buf + len - 1;

Thus maybe s/ if(len) / if (len  len  sizeof(buf)-1) / to resort to the
defaults in this case.

-- 
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 55703] New: Error in the JNDI Generic JavaBean Resources documentation

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55703

Bug ID: 55703
   Summary: Error in the JNDI Generic JavaBean Resources
documentation
   Product: Tomcat 7
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Documentation
  Assignee: dev@tomcat.apache.org
  Reporter: giulio.quares...@gmail.com

http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#Generic_JavaBean_Resources

In this page of the Tomcat 7 documentation - but this is true for all versions
- there is the following statement:

The resource factory will create a new instance of the appropriate bean class
every time a lookup() for this entry is made.

But that seems not true. I created an example foo.bar.Bean, which simply
increment a static int at each creation. Then, I configured a BeanFactory in
the global resources section of server.xml, and I deployed a servlet which
simply lookup 1000 thousand times for the bean and print its string
representation in the response. 

To reproduce, follow the steps below using the targz attached:

1) configure a resource with a BeanFactory, as in the server.xml attached;
2) put the bean-factory-bug-bean.jar in the common classpath of the container;
3) start the container;
4) deploy the bean-factory-bug-web.war file in the appbase folder;
5) open http://localhost:8080/bean-factory-bug-web/BeanServlet

As for one can read from the documentation, the expected output is 

Bean #1
Bean #2
Bean #3
...
Bean #999
Bean #1000

But the actual output is

Bean #1
Bean #1
Bean #1
...
Bean #1
Bean #1

I think that the actual behaviour of the container is the most advisable
behaviour, but would be better to update the documentation to match it and
avoid misleading.

Thanks.

Giulio Quaresima (Ph.D) - Perugia - Italy

-- 
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 55703] Error in the JNDI Generic JavaBean Resources documentation

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55703

--- Comment #1 from Giulio Quaresima giulio.quares...@gmail.com ---
Created attachment 30969
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30969action=edit
server.xml and the test classes in maven format

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

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



[jira] [Created] (MTOMCAT-245) Missing useBodyEncodingForURI parameter on connector

2013-10-25 Thread JIRA
Cédric Dutoit created MTOMCAT-245:
-

 Summary: Missing useBodyEncodingForURI parameter on connector
 Key: MTOMCAT-245
 URL: https://issues.apache.org/jira/browse/MTOMCAT-245
 Project: Apache Tomcat Maven Plugin
  Issue Type: Improvement
  Components: tomcat7
Affects Versions: 2.2
Reporter: Cédric Dutoit
Assignee: Olivier Lamy (*$^¨%`£)
Priority: Critical
 Fix For: 2.2


UseBodyEncodingForURI is unsupported yet (25 oct 2013) in 2.2-SNAPSHOT. Please 
add it:

tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java

@Parameter( property = maven.tomcat.useBodyEncodingForURI, defaultValue = 
false )
private boolean useBodyEncodingForURI;

then next to connector.setURIEncoding( uriEncoding );, add
connector.setUseBodyEncodingForURI( useBodyEncodingForURI );

then next to ajpConnector.setURIEncoding( uriEncoding );, add
ajpConnector.setUseBodyEncodingForURI( useBodyEncodingForURI );



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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



[Bug 55691] javax.el.ArrayELResolver.setValue not supporting arrays of primitives

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691

--- Comment #4 from Christopher Schultz ch...@christopherschultz.net ---
Created attachment 30970
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30970action=edit
Proposed patch

Can you run this through your tests?

-- 
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 55691] javax.el.ArrayELResolver.setValue not supporting arrays of primitives

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55691

--- Comment #5 from Christopher Schultz ch...@christopherschultz.net ---
This patch is against Tomcat 8 (trunk), but will likely apply cleanly to
earlier versions.

-- 
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 55696] mod_jk crash in jk_map_get_int()

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55696

--- Comment #12 from Christopher Schultz ch...@christopherschultz.net ---
Konstantin,

Yeah, sorry about the tabs. I used vi in stupid-mode. I'll get close cleaned-up
before a commit.

As for the stncpy, I was originally thinking that an int couldn't be longer
than a few characters, but on further reflection, it doesn't matter: instead,
its the user input that must be fewer than 100 characters if this isn't going
to fail.

I decided to use strncpy because the existing code used strcpy which was IMO
even worse. I was thinking I might make a bigger change to use strtol() and
actually look at the value of 'endptr' after the call. I didn't want a patch
that made too many changes at once.

Before my patch, the strcpy was happening *after* the use of len. I'll clean
that up, too.

Using strtol (instead of atoi) will do a better job of detecting problems with
the actual value coming from the user. Right now, if you say worker.port=abc,
then atoi will return an undefined value (probably 0) for that configuration
option. I'll fix the other stuff and then look at using strtol.

-- 
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: r1535783 - in /tomcat/site/trunk: ./ docs/tomcat-7.0-doc/ docs/tomcat-7.0-doc/api/ docs/tomcat-7.0-doc/api/org/apache/catalina/ docs/tomcat-7.0-doc/api/org/apache/catalina/ant/ docs/tomcat

2013-10-25 Thread violetagg
Author: violetagg
Date: Fri Oct 25 16:59:35 2013
New Revision: 1535783

URL: http://svn.apache.org/r1535783
Log:
Update docs for Apache Tomcat 7.0.47 release.


[This commit notification would consist of 436 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

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



[Bug 55706] New: broken apr version check in native v1.1.29 build; fails detect of installed v2.0.0

2013-10-25 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55706

Bug ID: 55706
   Summary: broken apr version check in native v1.1.29 build;
fails detect of installed v2.0.0
   Product: Tomcat Native
   Version: 1.1.29
  Hardware: All
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Library
  Assignee: dev@tomcat.apache.org
  Reporter: r...@sent.com

I'm building Tomcat 7.0.47.0 from src on

uname -a
Linux rand3.int 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23
UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux

Once built,

service tomcat7-custom version
jsvc (Apache Commons Daemon) 1.0.15-dev
Copyright (c) 1999-2011 Apache Software Foundation.
java version 1.7.0_15
OpenJDK Runtime Environment (build 1.7.0_15-b20)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
commons daemon version 1.0.15-dev
commons daemon process (id: 23245, parent: 23244)
Server version: Apache Tomcat/7.0.47
Server built:   Oct 25 2013 10:07:09
Server number:  7.0.47.0
OS Name:Linux
OS Version: 3.7.10-1.16-desktop
Architecture:   amd64
JVM Version:1.7.0_15-b20
JVM Vendor: Oracle Corporation

moving on to 'native',

cd tomcat7/build/bin
tar zxvf tomcat-native.tar.gz
cd tomcat-native-1.1.29-src/jni/native

configure fails @ APR version check

./configure \
 --prefix=/usr/local \
 --with-apr=/usr/local/apache24x/bin/apr-2-config \
 --with-java-home=/etc/alternatives/java_sdk_openjdk \
 --with-ssl=/usr/local/src/openssl/1.0.1e \
 --libdir=/usr/lib64

...
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.29
checking for chosen layout... tcnative
checking for APR... yes
configure: error: You need APR version 1.2.1 or newer installed. For
optimal performance version 1.3.0 or newer is needed.

but,

/usr/local/apache24x/bin/apr-2-config --version
2.0.0

applying this patch

cat /usr/local/src/tc-native.patch
Only in native: config.log
Only in native: config.nice
diff -ur native.ORIG/configure native/configure
--- native.ORIG/configure2013-10-10 05:51:58.0 -0700
+++ native/configure2013-10-25 10:11:19.692085473 -0700
@@ -1903,7 +1903,7 @@
 TEST_X=test -x
   fi

-  acceptable_majors=1
+  acceptable_majors=2

   apr_temp_acceptable_apr_config=
   for apr_temp_major in $acceptable_majors
@@ -2020,20 +2020,20 @@
   fi
   sapr_version=`echo $sapr_pversion|sed -e 's/\(a-z*\)$/.\1/'`
   tc_save_IFS=$IFS; IFS=.; set $sapr_version; IFS=$tc_save_IFS
-  if test ${1} -lt 1; then
-{ { echo $as_me:$LINENO: error: You need APR version 1.2.1 or
newer installed. For optimal performance version 1.3.0 or newer is needed. 5
-echo $as_me: error: You need APR version 1.2.1 or newer
installed. For optimal performance version 1.3.0 or newer is needed. 2;}
-   { (exit 1); exit 1; }; }
-  else
-if test ${2} -lt 2; then
-  { { echo $as_me:$LINENO: error: You need APR version 1.2.1
or newer installed. For optimal performance version 1.3.0 or newer is needed.
5
-echo $as_me: error: You need APR version 1.2.1 or newer
installed. For optimal performance version 1.3.0 or newer is needed. 2;}
-   { (exit 1); exit 1; }; }
-elif test ${2} -lt 3; then
-  { echo $as_me:$LINENO: WARNING: For optimal performance you
need APR version 1.3.0 or newer installed. 5
-echo $as_me: WARNING: For optimal performance you need APR
version 1.3.0 or newer installed. 2;}
-fi
-  fi
+#  if test ${1} -lt 1; then
+#{ { echo $as_me:$LINENO: error: You need APR version 1.2.1
or newer installed. For optimal performance version 1.3.0 or newer is needed.
5
+#echo $as_me: error: You need APR version 1.2.1 or newer
installed. For optimal performance version 1.3.0 or newer is needed. 2;}
+#   { (exit 1); exit 1; }; }
+#  else
+#if test ${2} -lt 2; then
+#  { { echo $as_me:$LINENO: error: You need APR version 1.2.1
or newer installed. For optimal performance version 

svn commit: r1535819 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/upgrade/AprServletInputStream.java java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java

2013-10-25 Thread markt
Author: markt
Date: Fri Oct 25 19:06:31 2013
New Revision: 1535819

URL: http://svn.apache.org/r1535819
Log:
Revert the swallowing of the Status.APR_EGENERAL. It can't be the SSL handshake 
failing as that has to have completed for the code to get this far and it 
appears to be related (the same?) as the random closes when using the drawing 
board example.

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

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java?rev=1535819r1=1535818r2=1535819view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 Fri Oct 25 19:06:31 2013
@@ -98,9 +98,6 @@ public class AprServletInputStream exten
 (-result == Status.APR_OS_START_SYSERR + 10053)) {
 // 10053 on Windows is connection aborted
 throw new EOFException(sm.getString(apr.clientAbort));
-} else if (-result == Status.APR_EGENERAL  wrapper.isSecure()) {
-// Connection abort by client during SSL handshake
-throw new EOFException(sm.getString(apr.clientAbort));
 } else {
 throw new IOException(sm.getString(apr.read.error,
 Integer.valueOf(-result), Long.valueOf(socket)));

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java?rev=1535819r1=1535818r2=1535819view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
 Fri Oct 25 19:06:31 2013
@@ -141,9 +141,6 @@ public class AprServletOutputStream exte
 (-written == Status.APR_OS_START_SYSERR + 10053)) {
 // 10053 on Windows is connection aborted
 throw new EOFException(sm.getString(apr.clientAbort));
-} else if (-written == Status.APR_EGENERAL  wrapper.isSecure()) {
-// Connection abort by client during SSL handshake
-throw new EOFException(sm.getString(apr.clientAbort));
 } else if (written  0) {
 throw new IOException(sm.getString(apr.write.error,
 Integer.valueOf(-written), Long.valueOf(socket)));



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



svn commit: r1535821 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/upgrade/AprServletInputStream.java java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java

2013-10-25 Thread markt
Author: markt
Date: Fri Oct 25 19:07:49 2013
New Revision: 1535821

URL: http://svn.apache.org/r1535821
Log:
Check for closed sockets earlier and reduce code duplication.

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

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java?rev=1535821r1=1535820r2=1535821view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 Fri Oct 25 19:07:49 2013
@@ -44,6 +44,10 @@ public class AprServletInputStream exten
 protected int doRead(boolean block, byte[] b, int off, int len)
 throws IOException {
 
+if (closed) {
+throw new IOException(sm.getString(apr.closed, 
Long.valueOf(socket)));
+}
+
 Lock readLock = wrapper.getBlockingStatusReadLock();
 WriteLock writeLock = wrapper.getBlockingStatusWriteLock();
 
@@ -52,9 +56,6 @@ public class AprServletInputStream exten
 try {
 readLock.lock();
 if (wrapper.getBlockingStatus() == block) {
-if (closed) {
-throw new IOException(sm.getString(apr.closed, 
Long.valueOf(socket)));
-}
 result = Socket.recv(socket, b, off, len);
 readDone = true;
 }
@@ -72,9 +73,6 @@ public class AprServletInputStream exten
 try {
 readLock.lock();
 writeLock.unlock();
-if (closed) {
-throw new IOException(sm.getString(apr.closed, 
Long.valueOf(socket)));
-}
 result = Socket.recv(socket, b, off, len);
 } finally {
 readLock.unlock();

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java?rev=1535821r1=1535820r2=1535821view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
 Fri Oct 25 19:07:49 2013
@@ -56,15 +56,16 @@ public class AprServletOutputStream exte
 protected int doWrite(boolean block, byte[] b, int off, int len)
 throws IOException {
 
+if (closed) {
+throw new IOException(sm.getString(apr.closed, 
Long.valueOf(socket)));
+}
+
 Lock readLock = wrapper.getBlockingStatusReadLock();
 WriteLock writeLock = wrapper.getBlockingStatusWriteLock();
 
 try {
 readLock.lock();
 if (wrapper.getBlockingStatus() == block) {
-if (closed) {
-throw new IOException(sm.getString(apr.closed, 
Long.valueOf(socket)));
-}
 return doWriteInternal(b, off, len);
 }
 } finally {
@@ -85,9 +86,6 @@ public class AprServletOutputStream exte
 try {
 readLock.lock();
 writeLock.unlock();
-if (closed) {
-throw new IOException(sm.getString(apr.closed, 
Long.valueOf(socket)));
-}
 return doWriteInternal(b, off, len);
 } finally {
 readLock.unlock();



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



svn commit: r1535822 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/AprEndpoint.java

2013-10-25 Thread markt
Author: markt
Date: Fri Oct 25 19:08:41 2013
New Revision: 1535822

URL: http://svn.apache.org/r1535822
Log:
Remove socket from list of connections as soon as we know it is going to be 
closed.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1535822r1=1535821r2=1535822view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri 
Oct 25 19:08:41 2013
@@ -895,6 +895,8 @@ public class AprEndpoint extends Abstrac
 // parent pool or acceptor socket.
 // In any case disable double free which would cause JVM core.
 
+connections.remove(Long.valueOf(socket));
+
 // While the connector is running, destroySocket() will call
 // countDownConnection(). Once the connector is stopped, the latch is
 // removed so it does not matter that destroySocket() does not call



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



svn commit: r1535825 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/upgrade/ webapps/docs/

2013-10-25 Thread markt
Author: markt
Date: Fri Oct 25 19:11:09 2013
New Revision: 1535825

URL: http://svn.apache.org/r1535825
Log:
Add wrapper information to error message

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

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java?rev=1535825r1=1535824r2=1535825view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 Fri Oct 25 19:11:09 2013
@@ -98,7 +98,7 @@ public class AprServletInputStream exten
 throw new EOFException(sm.getString(apr.clientAbort));
 } else {
 throw new IOException(sm.getString(apr.read.error,
-Integer.valueOf(-result), Long.valueOf(socket)));
+Integer.valueOf(-result), Long.valueOf(socket), wrapper));
 }
 }
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java?rev=1535825r1=1535824r2=1535825view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java
 Fri Oct 25 19:11:09 2013
@@ -141,7 +141,7 @@ public class AprServletOutputStream exte
 throw new EOFException(sm.getString(apr.clientAbort));
 } else if (written  0) {
 throw new IOException(sm.getString(apr.write.error,
-Integer.valueOf(-written), Long.valueOf(socket)));
+Integer.valueOf(-written), Long.valueOf(socket), 
wrapper));
 }
 start += written;
 left -= written;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties?rev=1535825r1=1535824r2=1535825view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
 Fri Oct 25 19:11:09 2013
@@ -25,8 +25,8 @@ upgrade.sos.writeListener.null=It is ill
 upgrade.sis.write.ise=It is illegal to call any of the write() methods in 
non-blocking mode without first checking that there is space available by 
calling isReady()
 
 apr.clientAbort=The client aborted the connection.
-apr.read.error=Unexpected error [{0}] reading data from the APR/native socket 
[{1}].
-apr.write.error=Unexpected error [{0}] writing data to the APR/native socket 
[{1}].
+apr.read.error=Unexpected error [{0}] reading data from the APR/native socket 
[{1}] with wrapper [{2}].
+apr.write.error=Unexpected error [{0}] writing data to the APR/native socket 
[{1}] with wrapper [{2}].
 apr.closed=The socket [{0}] associated with this connection has been closed.
 
 nio.eof.error=Unexpected EOF read on the socket

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1535825r1=1535824r2=1535825view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct 25 19:11:09 2013
@@ -85,6 +85,14 @@
   /fix
 /changelog
   /subsection
+  subsection name=Coyote
+changelog
+  scode
+Implement a number of small refactorings to the APR/native handler for
+upgraded HTTP connections. (markt)
+  /scode
+/changelog
+  /subsection
   subsection name=Cluster
 changelog
   add



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



svn commit: r1535826 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/SocketWrapper.java

2013-10-25 Thread markt
Author: markt
Date: Fri Oct 25 19:11:53 2013
New Revision: 1535826

URL: http://svn.apache.org/r1535826
Log:
Improve debug logging of SocketWrapper that just uses toString()

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1534612,1534616

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java?rev=1535826r1=1535825r2=1535826view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Fri 
Oct 25 19:11:53 2013
@@ -104,4 +104,15 @@ public class SocketWrapperE {
 this.timeout = timeout;
 upgraded = false;
 }
+
+/**
+ * Overridden for debug purposes. No guarantees are made about the format 
of
+ * this message which may vary significantly between point releases.
+ * p
+ * {@inheritDoc}
+ */
+@Override
+public String toString() {
+return super.toString() + : + String.valueOf(socket);
+}
 }



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



svn commit: r1535828 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/upgrade/AprServletInputStream.java java/org/apache/coyote/http11/upgrade/LocalStrings.properties webapps/docs/changelo

2013-10-25 Thread markt
Author: markt
Date: Fri Oct 25 19:15:47 2013
New Revision: 1535828

URL: http://svn.apache.org/r1535828
Log:
Fix the unexpected closure issues with APR/native, SSL and the drawboard example

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

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java?rev=1535828r1=1535827r2=1535828view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
 Fri Oct 25 19:15:47 2013
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jni.OS;
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
@@ -28,6 +30,8 @@ import org.apache.tomcat.util.net.Socket
 
 public class AprServletInputStream extends AbstractServletInputStream {
 
+private static final Log log = 
LogFactory.getLog(AprServletInputStream.class);
+
 private final SocketWrapperLong wrapper;
 private final long socket;
 private volatile boolean eagain = false;
@@ -92,6 +96,18 @@ public class AprServletInputStream exten
 } else if (-result == Status.EAGAIN) {
 eagain = true;
 return 0;
+} else if (-result == Status.APR_EGENERAL  wrapper.isSecure()) {
+// Not entirely sure why this is necessary. Testing to date has not
+// identified any issues with this but log it so it can be tracked
+// if it is suspected of causing issues in the future.
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(apr.read.sslGeneralError,
+Long.valueOf(socket), wrapper));
+}
+eagain = true;
+return 0;
+} else if (-result == Status.APR_EOF) {
+throw new EOFException(sm.getString(apr.clientAbort));
 } else if ((OS.IS_WIN32 || OS.IS_WIN64) 
 (-result == Status.APR_OS_START_SYSERR + 10053)) {
 // 10053 on Windows is connection aborted

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties?rev=1535828r1=1535827r2=1535828view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
 Fri Oct 25 19:15:47 2013
@@ -26,6 +26,7 @@ upgrade.sis.write.ise=It is illegal to c
 
 apr.clientAbort=The client aborted the connection.
 apr.read.error=Unexpected error [{0}] reading data from the APR/native socket 
[{1}] with wrapper [{2}].
+apr.read.sslGeneralError=An APR general error was returned by the SSL read 
operation on APR/native socket [{0}] with wrapper [{1}]. It will be treated as 
EAGAIN and the socket returned to the poller.
 apr.write.error=Unexpected error [{0}] writing data to the APR/native socket 
[{1}] with wrapper [{2}].
 apr.closed=The socket [{0}] associated with this connection has been closed.
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1535828r1=1535827r2=1535828view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct 25 19:15:47 2013
@@ -91,6 +91,11 @@
 Implement a number of small refactorings to the APR/native handler for
 upgraded HTTP connections. (markt)
   /scode
+  fix
+Fix an issue with upgraded HTTP connections over HTTPS (e.g. secure
+WebSocket) when using the APR/native connector that resulted in the
+unexpected closure of the connection. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Cluster



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