svn commit: r1607800 - /tomcat/trunk/webapps/docs/config/valve.xml

2014-07-04 Thread remm
Author: remm
Date: Fri Jul  4 08:53:22 2014
New Revision: 1607800

URL: http://svn.apache.org/r1607800
Log:
Add docs for new ssl attributes.

Modified:
tomcat/trunk/webapps/docs/config/valve.xml

Modified: tomcat/trunk/webapps/docs/config/valve.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/valve.xml?rev=1607800&r1=1607799&r2=1607800&view=diff
==
--- tomcat/trunk/webapps/docs/config/valve.xml (original)
+++ tomcat/trunk/webapps/docs/config/valve.xml Fri Jul  4 08:53:22 2014
@@ -789,6 +789,30 @@
 
   
 
+  
+Allows setting a custom name for the ssl_client_cert header.
+If not specified, the default of ssl_client_cert is
+used.
+  
+
+  
+Allows setting a custom name for the ssl_cipher header.
+If not specified, the default of ssl_cipher is
+used.
+  
+
+  
+Allows setting a custom name for the ssl_session_id header.
+If not specified, the default of ssl_session_id is
+used.
+  
+
+  
+Allows setting a custom name for the ssl_cipher_usekeysize header.
+If not specified, the default of ssl_cipher_usekeysize is
+used.
+  
+
 
 
   



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



[Bug 56694] checkInterval attribute is not existant on StandardManager or embedded Stores of PersistentManager

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56694

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Thanks for the report. This has been fixed in 8.0.x for 8.0.10 onwards.
Searching the codebase for "checkInterval" found a few more similar issues that
I also fixed.

-- 
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: r1607802 - in /tomcat/trunk: java/org/apache/catalina/session/package.html webapps/docs/changelog.xml webapps/docs/config/manager.xml webapps/docs/funcspecs/fs-admin-objects.xml

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 09:03:51 2014
New Revision: 1607802

URL: http://svn.apache.org/r1607802
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56694
Remove references to checkInterval attribute that are no longer valid and 
related fixes.

Modified:
tomcat/trunk/java/org/apache/catalina/session/package.html
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/manager.xml
tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml

Modified: tomcat/trunk/java/org/apache/catalina/session/package.html
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/package.html?rev=1607802&r1=1607801&r2=1607802&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/package.html (original)
+++ tomcat/trunk/java/org/apache/catalina/session/package.html Fri Jul  4 
09:03:51 2014
@@ -52,8 +52,6 @@ setting the following properties:
 (StandardManager) supports the following additional configuration
 properties:
 
-checkInterval - The interval, in seconds, between checks for
-sessions that have expired and should be invalidated.  [60]
 maxActiveSessions - The maximum number of active sessions that
 will be allowed, or -1 for no limit.  [-1]
 pathname - Pathname to the file that is used to store session

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1607802&r1=1607801&r2=1607802&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul  4 09:03:51 2014
@@ -145,6 +145,13 @@
 examples web application from security sensitive systems be ignored.
 (markt)
   
+  
+56694: Remove references to Manager attribute
+checkInterval from documentation and Javadoc since it no
+longer exists. Based on a patch by Felix Schumacher. Also remove other
+references to checkInterval that are no longer valid.
+(markt)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/config/manager.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/manager.xml?rev=1607802&r1=1607801&r2=1607802&view=diff
==
--- tomcat/trunk/webapps/docs/config/manager.xml (original)
+++ tomcat/trunk/webapps/docs/config/manager.xml Fri Jul  4 09:03:51 2014
@@ -305,12 +305,6 @@
 
   
 
-
-  The interval (in seconds) between checks for expired sessions
-  among those sessions that are currently swapped out.  By default,
-  this interval is set to 60 seconds (one minute).
-
-
 
   Java class name of the implementation to use.  This class must
   implement the org.apache.catalina.Store interface.  You
@@ -343,12 +337,6 @@
 
   
 
-
-  The interval (in seconds) between checks for expired sessions
-  among those sessions that are currently swapped out.  By default,
-  this interval is set to 60 seconds (one minute).
-
-
 
   Java class name of the implementation to use.  This class must
   implement the org.apache.catalina.Store interface.  You

Modified: tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml?rev=1607802&r1=1607801&r2=1607802&view=diff
==
--- tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml (original)
+++ tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml Fri Jul  4 
09:03:51 2014
@@ -367,12 +367,9 @@ Operations that can be performed whe
   Context.
 
   The standard component implementing a Loader is
-  org.apache.catalina.loader.StandardLoader.  It supports
+  org.apache.catalina.loader.WebappLoader.  It supports
   the following configurable properties:
   
-  checkInterval - Number of seconds between checks for
-  modified classes, if automatic reloading is enabled.  [15]
-  debug - Debugging detail level.  [0]
   reloadable - Should this class loader check for modified
   classes and initiate automatic reloads?  [Set automatically from the
   reloadable property of the corresponding Context]
@@ -394,9 +391,6 @@ Operations that can be performed whe
   org.apache.catalina.session.StandardManager.  It supports
   the following configurable properties:
   
-  checkInterval - Number of seconds between checks for
-  expired sessions.  [60]
-  debug - Debugging detail level.  [0]
   maxActiveSessions - The maximum number of active sessions
   that are allowed, or -1 for no limit.  [-1]
   



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

[Bug 56681] List of Exception Management Anti-Patterns and Code Smells

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56681

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #17 from Mark Thomas  ---
Blindly copying the output from some random code analysis tool into a bug
without validating the results is not going to generate a useful bug report.

I looked at the first few of these and they were all false positives. I did
manage to find one valid issue and a couple of possibles but the false positive
rate is significant.

The Tomcat project does use carefully selected code analysis tools and one of
the criteria for selection is the false positive rate. The false positive rate
of the tool used for this analysis is far too high to be useful.

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



Early Access builds for JDK 9 b21, JDK 8u20 b21 are available on java.net

2014-07-04 Thread Rory O'Donnell Oracle, Dublin Ireland

Hi Mladen/Mark,

Early Access builds for JDK 9 b21   and 
JDK 8u20 b21   are available on 
java.net.


As we enter the later phases of development for JDK 8u20 , please log 
any show

stoppers as soon as possible.

Rgds, Rory

--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland



svn commit: r1607804 - /tomcat/trunk/java/javax/servlet/http/Cookie.java

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 09:23:41 2014
New Revision: 1607804

URL: http://svn.apache.org/r1607804
Log:
Wrap the root cause rather than just using the message.

Modified:
tomcat/trunk/java/javax/servlet/http/Cookie.java

Modified: tomcat/trunk/java/javax/servlet/http/Cookie.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/Cookie.java?rev=1607804&r1=1607803&r2=1607804&view=diff
==
--- tomcat/trunk/java/javax/servlet/http/Cookie.java (original)
+++ tomcat/trunk/java/javax/servlet/http/Cookie.java Fri Jul  4 09:23:41 2014
@@ -352,7 +352,7 @@ public class Cookie implements Cloneable
 try {
 return super.clone();
 } catch (CloneNotSupportedException e) {
-throw new RuntimeException(e.getMessage());
+throw new RuntimeException(e);
 }
 }
 



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



svn commit: r1607806 - /tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 09:31:50 2014
New Revision: 1607806

URL: http://svn.apache.org/r1607806
Log:
Reduce visibility (kkolinko review)

Modified:
tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java?rev=1607806&r1=1607805&r2=1607806&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java Fri Jul  4 
09:31:50 2014
@@ -64,10 +64,10 @@ public class SSLValve extends ValveBase 
 
 private static final Log log = LogFactory.getLog(SSLValve.class);
 
-protected String sslClientCertHeader = "ssl_client_cert";
-protected String sslCipherHeader = "ssl_cipher";
-protected String sslSessionIdHeader = "ssl_session_id";
-protected String sslCipherUserKeySizeHeader = "ssl_cipher_usekeysize";
+private String sslClientCertHeader = "ssl_client_cert";
+private String sslCipherHeader = "ssl_cipher";
+private String sslSessionIdHeader = "ssl_session_id";
+private String sslCipherUserKeySizeHeader = "ssl_cipher_usekeysize";
 
 //-- Constructor
 public SSLValve() {



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



svn commit: r1607807 - /tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 09:32:49 2014
New Revision: 1607807

URL: http://svn.apache.org/r1607807
Log:
Fix Javadoc nags

Modified:
tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java?rev=1607807&r1=1607806&r2=1607807&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/IStoreConfig.java Fri Jul 
 4 09:32:49 2014
@@ -57,9 +57,6 @@ public interface IStoreConfig {
 
 /**
  * Store the current StoreFactory Server.
- *
- * @exception Exception
- *if an exception occurs while storing
  */
 void storeConfig();
 
@@ -68,9 +65,6 @@ public interface IStoreConfig {
  *
  * @param aServer
  *Object to be stored
- *
- * @exception Exception
- *if an exception occurs while storing
  */
 boolean store(Server aServer);
 



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



[Bug 56652] EL defineFunction does not support method signatures with arrays as arguments

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56652

--- Comment #2 from Mark Thomas  ---
The proposed solution can not be used. The EL API may not be changed. I'm
working on a solution along similar lines but the work is done in the
ELProcessor.

-- 
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 Tomcat Native 1.1.31

2014-07-04 Thread jean-frederic clere

On 03/07/14 00:07, Mark Thomas wrote:

  [X] Stable, go ahead and release


All my tests are OK.

Cheers

Jean-Frederic

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



svn commit: r1607906 - in /tomcat/trunk: java/javax/el/ java/org/apache/el/lang/ java/org/apache/el/parser/ test/javax/el/ webapps/docs/

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 18:47:02 2014
New Revision: 1607906

URL: http://svn.apache.org/r1607906
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56652
Add support for method parameters that use arrays and varargs to 
ELProcessor.defineFunction()

Modified:
tomcat/trunk/java/javax/el/ELProcessor.java
tomcat/trunk/java/org/apache/el/lang/ELSupport.java
tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java
tomcat/trunk/java/org/apache/el/parser/AstFunction.java
tomcat/trunk/test/javax/el/TestELProcessor.java
tomcat/trunk/test/javax/el/TesterFunctions.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/javax/el/ELProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELProcessor.java?rev=1607906&r1=1607905&r2=1607906&view=diff
==
--- tomcat/trunk/java/javax/el/ELProcessor.java (original)
+++ tomcat/trunk/java/javax/el/ELProcessor.java Fri Jul  4 18:47:02 2014
@@ -134,7 +134,17 @@ public class ELProcessor {
 if (types.length == typeNames.length) {
 boolean match = true;
 for (int i = 0; i < types.length; i++) {
-if (!types[i].getName().equals(typeNames[i])) {
+if (i == types.length -1 && method.isVarArgs()) {
+String typeName = typeNames[i];
+if (typeName.endsWith("...")) {
+typeName = typeName.substring(0, 
typeName.length() - 3);
+if (!typeName.equals(types[i].getName())) {
+match = false;
+}
+} else {
+match = false;
+}
+} else if 
(!types[i].getName().equals(typeNames[i])) {
 match = false;
 break;
 }
@@ -235,7 +245,58 @@ public class ELProcessor {
 ImportHandler importHandler = context.getImportHandler();
 for (int i = 0; i < parameterTypeNames.length; i++) {
 String parameterTypeName = 
parameterTypeNames[i].trim();
-if (!PRIMITIVES.contains(parameterTypeName) &&
+int dimension = 0;
+int bracketPos = parameterTypeName.indexOf('[');
+if (bracketPos > -1) {
+String parameterTypeNameOnly =
+parameterTypeName.substring(0, 
bracketPos).trim();
+while (bracketPos > -1) {
+dimension++;
+bracketPos = parameterTypeName.indexOf('[', 
bracketPos+ 1);
+}
+parameterTypeName = parameterTypeNameOnly;
+}
+boolean varArgs = false;
+if (parameterTypeName.endsWith("...")) {
+varArgs = true;
+dimension = 1;
+parameterTypeName = parameterTypeName.substring(
+0, parameterTypeName.length() -3);
+}
+boolean isPrimitive = 
PRIMITIVES.contains(parameterTypeName);
+if (isPrimitive && dimension > 0) {
+// When in an array, class name changes for 
primitive
+switch(parameterTypeName)
+{
+case "boolean":
+parameterTypeName = "Z";
+break;
+case "byte":
+parameterTypeName = "B";
+break;
+case "char":
+parameterTypeName = "C";
+break;
+case "double":
+parameterTypeName = "D";
+break;
+case "float":
+parameterTypeName = "F";
+break;
+case "int":
+parameterTypeName = "I";
+break;
+case "long":
+parameterTypeName = "J";
+break;
+case "short":
+   

[Bug 56652] EL defineFunction does not support method signatures with arrays as arguments

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56652

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #3 from Mark Thomas  ---
This has been fixed in 8.0.x for 8.0.10 onwards. I also added support for
varargs.

-- 
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 56649] Concurrent issue of TagFileProcessor

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56649

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #5 from Mark Thomas  ---
Konstantin is right. Dedicated scratch directories should take care of this. I
should have realised that the original Jasper developers would have thought of
this. If separate directories doesn't address this, please feel free to
re-open, explain what the problem is and we'll take another look.

-- 
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 56661] ServletRequest#getLocalAddr() returns the hostname, not the IP address

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56661

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Mark Thomas  ---
Tested with 7.0.x and 8.0.x on OSX and request.getLocalAddr() returns an IP
address when accessed via http://localhost: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



svn commit: r1607930 - in /tomcat/trunk: java/org/apache/catalina/core/ApplicationHttpRequest.java webapps/docs/changelog.xml

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 20:16:21 2014
New Revision: 1607930

URL: http://svn.apache.org/r1607930
Log:
When the current PathInfo is modified as a result of dispatching a request, 
ensure that a call to HttpServletRequest.getPathTranslated() returns a value 
that is based on the modified PathInfo.

Modified:
tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1607930&r1=1607929&r2=1607930&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Fri 
Jul  4 20:16:21 2014
@@ -435,6 +435,16 @@ class ApplicationHttpRequest extends Htt
 
 
 /**
+ * Override the getPathTranslated() method of the wrapped
+ * request.
+ */
+@Override
+public String getPathTranslated() {
+return getServletContext().getRealPath(getPathInfo());
+}
+
+
+/**
  * Override the getQueryString() method of the wrapped
  * request.
  */

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1607930&r1=1607929&r2=1607930&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul  4 20:16:21 2014
@@ -107,6 +107,12 @@
 entry such as a delete operation.
 (markt)
   
+  
+When the current PathInfo is modified as a result of dispatching a
+request, ensure that a call to
+HttpServletRequest.getPathTranslated() returns a value 
that
+is based on the modified PathInfo. (markt)
+  
 
   
   



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



svn commit: r1607931 - /tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 20:18:33 2014
New Revision: 1607931

URL: http://svn.apache.org/r1607931
Log:
Add NPE protection

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

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1607931&r1=1607930&r2=1607931&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Fri 
Jul  4 20:18:33 2014
@@ -440,6 +440,10 @@ class ApplicationHttpRequest extends Htt
  */
 @Override
 public String getPathTranslated() {
+if (getPathInfo() == null) {
+return null;
+}
+
 return getServletContext().getRealPath(getPathInfo());
 }
 



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



svn commit: r1607934 - in /tomcat/trunk: java/org/apache/catalina/core/ApplicationHttpRequest.java webapps/docs/changelog.xml

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 20:30:29 2014
New Revision: 1607934

URL: http://svn.apache.org/r1607934
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56677
Ensure that HttpServletRequest.getServletContext() returns the correct value 
during a cross-context dispatch. 

Modified:
tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1607934&r1=1607933&r2=1607934&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Fri 
Jul  4 20:30:29 2014
@@ -30,6 +30,7 @@ import java.util.NoSuchElementException;
 
 import javax.servlet.DispatcherType;
 import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 import javax.servlet.http.HttpSession;
@@ -188,6 +189,14 @@ class ApplicationHttpRequest extends Htt
 
 // - ServletRequest Methods
 
+@Override
+public ServletContext getServletContext() {
+if (context == null) {
+return null;
+}
+return context.getServletContext();
+}
+
 
 /**
  * Override the getAttribute() method of the wrapped request.

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1607934&r1=1607933&r2=1607934&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul  4 20:30:29 2014
@@ -101,6 +101,11 @@
 (markt)
   
   
+56677: Ensure that
+HttpServletRequest.getServletContext() returns the correct
+value during a cross-context dispatch. (markt)
+  
+  
 56693: Fix various issues in the static resource cache
 implementation where the cache retained a stale entry after the
 successful completion of an operation that always invalidates the cache



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



svn commit: r1607935 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ApplicationHttpRequest.java webapps/docs/changelog.xml

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 20:33:31 2014
New Revision: 1607935

URL: http://svn.apache.org/r1607935
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56677
Ensure that HttpServletRequest.getServletContext() returns the correct value 
during a cross-context dispatch. 

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

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1607935&r1=1607934&r2=1607935&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
Fri Jul  4 20:33:31 2014
@@ -30,6 +30,7 @@ import java.util.NoSuchElementException;
 
 import javax.servlet.DispatcherType;
 import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 import javax.servlet.http.HttpSession;
@@ -195,6 +196,14 @@ class ApplicationHttpRequest extends Htt
 
 // - ServletRequest Methods
 
+@Override
+public ServletContext getServletContext() {
+if (context == null) {
+return null;
+}
+return context.getServletContext();
+}
+
 
 /**
  * Override the getAttribute() method of the wrapped request.

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=1607935&r1=1607934&r2=1607935&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul  4 20:33:31 2014
@@ -130,6 +130,11 @@
 domain, path, httpOnly and secure as were used to set the SSO cookie.
 (markt) 
   
+  
+56677: Ensure that
+HttpServletRequest.getServletContext() returns the correct
+value during a cross-context dispatch. (markt)
+  
 
   
   



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



[Bug 56677] ApplicationHttpRequest does not override javax.servlet.ServletRequestWrapper#getServletContext()

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56677

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Thanks for the report. This has been fixed in 8.0.x for 8.0.10 onwards and in
7.0.x for 7.0.55 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: r1607936 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ApplicationHttpRequest.java webapps/docs/changelog.xml

2014-07-04 Thread markt
Author: markt
Date: Fri Jul  4 20:35:37 2014
New Revision: 1607936

URL: http://svn.apache.org/r1607936
Log:
When the current PathInfo is modified as a result of dispatching a request, 
ensure that a call to HttpServletRequest.getPathTranslated() returns a value 
that is based on the modified PathInfo.

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

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1607930-1607931

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1607936&r1=1607935&r2=1607936&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 
Fri Jul  4 20:35:37 2014
@@ -451,6 +451,20 @@ class ApplicationHttpRequest extends Htt
 
 
 /**
+ * Override the getPathTranslated() method of the wrapped
+ * request.
+ */
+@Override
+public String getPathTranslated() {
+if (getPathInfo() == null) {
+return null;
+}
+
+return getServletContext().getRealPath(getPathInfo());
+}
+
+
+/**
  * Override the getQueryString() method of the wrapped
  * request.
  */

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=1607936&r1=1607935&r2=1607936&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jul  4 20:35:37 2014
@@ -135,6 +135,12 @@
 HttpServletRequest.getServletContext() returns the correct
 value during a cross-context dispatch. (markt)
   
+  
+When the current PathInfo is modified as a result of dispatching a
+request, ensure that a call to
+HttpServletRequest.getPathTranslated() returns a value 
that
+is based on the modified PathInfo. (markt)
+  
 
   
   



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



[Bug 56661] ServletRequest#getLocalAddr() returns the hostname, not the IP address

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56661

Palle Girgensohn  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #3 from Palle Girgensohn  ---
I do get 0:0:0:0:0:0:0:1 when accessing http://localhost:8080/ now, that might
just have been a mistake.

It seems that the problem is with the AJP Connector?

$ cat foo.jsp 
<%= request.getLocalAddr() %>
$ curl  http://localhost/foo.jsp
localhost
$ curl -k https://localhost/foo.jsp
localhost

This holds true for tomcat 7.0.54 on FreeBSD and Mac OS X.

-- 
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 56661] ServletRequest#getLocalAddr() returns the hostname, not the IP address

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56661

--- Comment #4 from Konstantin Preißer  ---
Hi,

I can confirm that this problem happens with Tomcat 8.0.9 when using AJP NIO
connector (I used the ISAPI Redirector with IIS).
In this case, request.getLocalAddr() returns the name of the "Host" header
instead of an IP address, e.g. "localhost".

If using the HTTP NIO connector, the problem does not occur;
request.getLocalAddr() will return an IP address in this case, e.g.
"0:0:0:0:0:0:0:1".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in ASF Buildbot on tomcat-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1607934
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot




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



[Bug 56692] request.getParameterNames(); returns empty Enumerations in Valve if servlet never call request.getParameterNames()

2014-07-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56692

--- Comment #4 from Daniel Qian  ---
(In reply to Violeta Georgieva from comment #2)
> Hi,
> 
> I cannot reproduce the described behavior.
> As Konstantin wrote please provide a reproducible example otherwise I'll
> close the issue with WORKSFORME.
> 
> Regards,
> Violeta

Code is uploaded

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