Re: Broken Download Links for Tomcat Native Binaries

2019-07-09 Thread Mark Thomas
On 09/07/2019 05:15, Igal Sapir wrote:
> The download page for the Tomcat Native Binaries [1] has broken links. 
> Pretty much all of the links under "Binaries for Microsoft Windows",
> e.g. the one labeled "Native 1.2.23 Windows Binaries zip" [2] returns a
> 404.
> 
> Were the binaries created at all?  Perhaps at a different location?

I failed to update the links correctly as the OpenSSL version changed.
I'll get that fixed now.

Mark


> 
> Igal
> 
> [1] http://tomcat.apache.org/download-native.cgi
> 
> [2]
> https://www-us.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.0.2q-win32-bin.zip
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



svn commit: r1862790 - in /tomcat/site/trunk: docs/download-native.html xdocs/download-native.xml

2019-07-09 Thread markt
Author: markt
Date: Tue Jul  9 08:35:02 2019
New Revision: 1862790

URL: http://svn.apache.org/viewvc?rev=1862790=rev
Log:
Fix typo

Modified:
tomcat/site/trunk/docs/download-native.html
tomcat/site/trunk/xdocs/download-native.xml

Modified: tomcat/site/trunk/docs/download-native.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-native.html?rev=1862790=1862789=1862790=diff
==
--- tomcat/site/trunk/docs/download-native.html (original)
+++ tomcat/site/trunk/docs/download-native.html Tue Jul  9 08:35:02 2019
@@ -342,7 +342,7 @@
 
 
 
-Binaries for Microsoft Windows build with OpenSSL 
1.1.1c
+Binaries for Microsoft Windows built with OpenSSL 
1.1.1c
 
 
   

Modified: tomcat/site/trunk/xdocs/download-native.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-native.xml?rev=1862790=1862789=1862790=diff
==
--- tomcat/site/trunk/xdocs/download-native.xml (original)
+++ tomcat/site/trunk/xdocs/download-native.xml Tue Jul  9 08:35:02 2019
@@ -89,7 +89,7 @@
   and 64-bit (x64) CPU architectures. You have to use the DLL that
   matches CPU architecture of JVM that you use to run Tomcat.
 
-Binaries for Microsoft Windows build with 
OpenSSL 1.1.1c
+Binaries for Microsoft Windows built with 
OpenSSL 1.1.1c
 
   
 



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



svn commit: r1862788 - in /tomcat/site/trunk: docs/download-native.html xdocs/download-native.xml

2019-07-09 Thread markt
Author: markt
Date: Tue Jul  9 08:34:25 2019
New Revision: 1862788

URL: http://svn.apache.org/viewvc?rev=1862788=rev
Log:
Correct Tomcat Native download links

Modified:
tomcat/site/trunk/docs/download-native.html
tomcat/site/trunk/xdocs/download-native.xml

Modified: tomcat/site/trunk/docs/download-native.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-native.html?rev=1862788=1862787=1862788=diff
==
--- tomcat/site/trunk/docs/download-native.html (original)
+++ tomcat/site/trunk/docs/download-native.html Tue Jul  9 08:34:25 2019
@@ -332,9 +332,8 @@
 The Windows binaries are available in two
   variants. a) Default. This is what people usually use. This
   version of library is included in Apache Tomcat distributions.
-  b) OCSP-enabled. This one has enabled (experimental)
-  support for verification of client SSL certificates via OCSP
-  protocol (https://bz.apache.org/bugzilla/show_bug.cgi?id=45392;>45392).
+  b) OCSP-enabled. This one has enabled support for verification of
+  client SSL certificates via OCSP protocol (https://bz.apache.org/bugzilla/show_bug.cgi?id=45392;>45392).
   
   
 Each archive contains tcnative-1.dll for 32-bit
@@ -343,19 +342,19 @@
 
 
 
-Binaries for Microsoft Windows build with OpenSSL 
1.0.2q
+Binaries for Microsoft Windows build with OpenSSL 
1.1.1c
 
 
   
 
 
-
+
   Native 1.2.23 Windows Binaries zip (recommended)
   
 
 
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.0.2q-win32-bin.zip.asc;>PGP],
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.0.2q-win32-bin.zip.sha512;>SHA512]
+  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1c-win32-bin.zip.asc;>PGP],
+  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1c-win32-bin.zip.sha512;>SHA512]
 
   
 
@@ -364,51 +363,14 @@
   
 
 
-
+
   Native 1.2.23 Windows OCSP-enabled Binaries zip
   
 
 
 
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.0.2q-ocsp-win32-bin.zip.asc;>PGP],
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.0.2q-ocsp-win32-bin.zip.sha512;>SHA512]
-
-  
-
-  
-
-
-
-
-Binaries for Microsoft Windows build with OpenSSL 
1.1.1a
-
-
-  
-
-
-
-  Native 1.2.23 Windows Binaries zip (recommended)
-  
-
-
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1a-win32-bin.zip.asc;>PGP],
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1a-win32-bin.zip.sha512;>SHA512]
-
-  
-
-  
-
-  
-
-
-
-  Native 1.2.23 Windows OCSP-enabled Binaries zip
-  
-
-
-
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1a-ocsp-win32-bin.zip.asc;>PGP],
-  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1a-ocsp-win32-bin.zip.sha512;>SHA512]
+  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1c-ocsp-win32-bin.zip.asc;>PGP],
+  [https://www.apache.org/dist/tomcat/tomcat-connectors/native/1.2.23/binaries/tomcat-native-1.2.23-openssl-1.1.1c-ocsp-win32-bin.zip.sha512;>SHA512]
 
   
 

Modified: tomcat/site/trunk/xdocs/download-native.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-native.xml?rev=1862788=1862787=1862788=diff
==
--- tomcat/site/trunk/xdocs/download-native.xml (original)
+++ tomcat/site/trunk/xdocs/download-native.xml Tue Jul  9 08:34:25 2019
@@ -82,56 +82,32 @@
 The Windows binaries are available in two
   variants. a) Default. This is what people usually use. This
   version of library is included in Apache Tomcat distributions.
-   

Re: Git repo for Tomcat Site

2019-07-09 Thread Mark Thomas
On 09/07/2019 05:29, Igal Sapir wrote:
> Can we move the Tomcat site to Git?

Yes. ASF infra supports both svnpubsub and gitpubsub for websites. There
will need to be a little co-ordination with infra as we'd need to switch
where the source for the site is pulled from.

On the plus side, Tomcat site svn repo is not mirrored to git so we
don't need to worry about any of that.

I'll look into to the migration process and figure out exactly what is
involved.

> Possibly to a repo named "tomcat-site"?

That makes sense.

In terms of when, I'd suggest after the 9.0.x and 8.5.x releases have
completed. There is usually a quietish period of ~3 weeks between
releases when the website doesn't update that much. I think it makes
sense to migrate then.

All of this is assuming there are no objections to moving. If there are
any objections please speak up now so we can discuss any concerns and
figure out a way forward everyone is happy with.

> I'd be happy to make the required changes per prior emails so that we
> can publish the new design in time for ACNA.

Migration to Git and a new design are two separate issues. I'd be happy
to see both proceed but I suggest we discuss them separately. I suggest
you start a new thread for the discussion about moving to a new design -
perhaps with a link to a demo of the latest proposal so we can remind
ourselves of what it looks like.

Mark


> 
> Thoughts?
> 
> Igal
> 
> 
> -
> 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



[VOTE][RESULT] Release Apache Tomcat 9.0.22

2019-07-09 Thread Mark Thomas
The following votes were cast:

Binding:
+1: remm, markt, isapir

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark

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



[tomcat] 02/02: Better attribute name

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 644af221e5cb8e6a17327c9a4319a69a2d1dc305
Author: Michael Osipov 
AuthorDate: Tue Jul 9 15:53:36 2019 +0200

Better attribute name
---
 java/org/apache/catalina/Globals.java| 11 +--
 java/org/apache/catalina/filters/RemoteIpFilter.java |  2 +-
 java/org/apache/catalina/valves/RemoteIpValve.java   |  4 ++--
 java/org/apache/coyote/Constants.java|  9 -
 test/org/apache/catalina/filters/TestRemoteIpFilter.java |  4 ++--
 test/org/apache/catalina/valves/TestRemoteIpValve.java   |  4 ++--
 6 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index edf91a0..7ce8209 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -200,13 +200,12 @@ public final class Globals {
 
 
 /**
- * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
- * be set by other similar components) that identifies this request has 
been
- * forwarded via one or more proxies. The value should be {@code 
java.lang.Boolean}.
- * Absence shall be treated as {@code false}.
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
  */
-public static final String FORWARDED_REQUEST_ATTRIBUTE =
-org.apache.coyote.Constants.FORWARDED_REQUEST_ATTRIBUTE;
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+org.apache.coyote.Constants.REQUEST_FORWARDED_ATTRIBUTE;
 
 
 public static final String ASYNC_SUPPORTED_ATTR =
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index f416f60..423b561 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -85,7 +85,7 @@ import org.apache.juli.logging.LogFactory;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
- * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
  * that this request has been forwarded by one or more proxies.
  * 
  * 
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 9e78c0f..cd08cc7 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,7 +64,7 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
- * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
  * that this request has been forwarded by one or more proxies.
  * 
  * 
@@ -653,7 +653,7 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
-request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
 
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index 58fa1e5..898068a 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -113,10 +113,9 @@ public final class Constants {
 public static final String REMOTE_ADDR_ATTRIBUTE = 
"org.apache.tomcat.remoteAddr";
 
 /**
- * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
- * be set by other similar components) that identifies this request has 
been
- * forwarded via one or more proxies. The value should be {@code 
java.lang.Boolean}.
- * Absence shall be treated as {@code false}.
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, 

[tomcat] branch mark-forwarded-request/8.5.x created (now 644af22)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


  at 644af22  Better attribute name

This branch includes the following new commits:

 new 2eeb813  Mark request as forwarded in RemoteIpValve/RemoteIpFilter
 new 644af22  Better attribute name

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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



[tomcat] 01/02: Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2eeb813dad2bcda58959b6eeea468d41f998f57b
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

Mark request as forwarded in RemoteIpValve/RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  | 10 
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 java/org/apache/coyote/Constants.java  |  8 ++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  7 +
 7 files changed, 86 insertions(+)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 8801724..edf91a0 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -199,6 +199,16 @@ public final class Globals {
 org.apache.coyote.Constants.REMOTE_ADDR_ATTRIBUTE;
 
 
+/**
+ * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
+ * be set by other similar components) that identifies this request has 
been
+ * forwarded via one or more proxies. The value should be {@code 
java.lang.Boolean}.
+ * Absence shall be treated as {@code false}.
+ */
+public static final String FORWARDED_REQUEST_ATTRIBUTE =
+org.apache.coyote.Constants.FORWARDED_REQUEST_ATTRIBUTE;
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 20b4abd..f416f60 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -85,6 +85,8 @@ import org.apache.juli.logging.LogFactory;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -860,6 +862,8 @@ public class RemoteIpFilter implements Filter {
 }
 }
 
+request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 145b095..9e78c0f 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -651,6 +653,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index 9de194d..58fa1e5 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -111,4 +111,12 @@ public final class Constants {
  * the X-Forwarded-For HTTP header.
  */
 public static final String REMOTE_ADDR_ATTRIBUTE = 
"org.apache.tomcat.remoteAddr";
+
+/**
+ * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
+ * be set by other similar components) that identifies this request has 
been
+ * forwarded via one or more proxies. 

[tomcat] 02/02: Better attribute name

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 7993b8b00f842141050ef65b5bedafeb33297e37
Author: Michael Osipov 
AuthorDate: Tue Jul 9 15:53:36 2019 +0200

Better attribute name
---
 java/org/apache/catalina/Globals.java| 11 +--
 java/org/apache/catalina/filters/RemoteIpFilter.java |  2 +-
 java/org/apache/catalina/valves/RemoteIpValve.java   |  4 ++--
 java/org/apache/coyote/Constants.java|  9 -
 test/org/apache/catalina/filters/TestRemoteIpFilter.java |  4 ++--
 test/org/apache/catalina/valves/TestRemoteIpValve.java   |  4 ++--
 6 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index edf91a0..7ce8209 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -200,13 +200,12 @@ public final class Globals {
 
 
 /**
- * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
- * be set by other similar components) that identifies this request has 
been
- * forwarded via one or more proxies. The value should be {@code 
java.lang.Boolean}.
- * Absence shall be treated as {@code false}.
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
  */
-public static final String FORWARDED_REQUEST_ATTRIBUTE =
-org.apache.coyote.Constants.FORWARDED_REQUEST_ATTRIBUTE;
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+org.apache.coyote.Constants.REQUEST_FORWARDED_ATTRIBUTE;
 
 
 public static final String ASYNC_SUPPORTED_ATTR =
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 82a9626..bf6431b 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -82,7 +82,7 @@ import org.apache.tomcat.util.res.StringManager;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
- * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
  * that this request has been forwarded by one or more proxies.
  * 
  * 
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 9e78c0f..cd08cc7 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,7 +64,7 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
- * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
  * that this request has been forwarded by one or more proxies.
  * 
  * 
@@ -653,7 +653,7 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
-request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
 
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index 6ed3172..6b264e3 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -98,10 +98,9 @@ public final class Constants {
 public static final String REMOTE_ADDR_ATTRIBUTE = 
"org.apache.tomcat.remoteAddr";
 
 /**
- * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
- * be set by other similar components) that identifies this request has 
been
- * forwarded via one or more proxies. The value should be {@code 
java.lang.Boolean}.
- * Absence shall be treated as {@code false}.
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, 

[tomcat] 01/02: Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit c5b816d6887b311d76101097d9343c34543a2ac9
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

Mark request as forwarded in RemoteIpValve/RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  | 10 
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 java/org/apache/coyote/Constants.java  |  8 ++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  7 +
 7 files changed, 86 insertions(+)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 8801724..edf91a0 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -199,6 +199,16 @@ public final class Globals {
 org.apache.coyote.Constants.REMOTE_ADDR_ATTRIBUTE;
 
 
+/**
+ * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
+ * be set by other similar components) that identifies this request has 
been
+ * forwarded via one or more proxies. The value should be {@code 
java.lang.Boolean}.
+ * Absence shall be treated as {@code false}.
+ */
+public static final String FORWARDED_REQUEST_ATTRIBUTE =
+org.apache.coyote.Constants.FORWARDED_REQUEST_ATTRIBUTE;
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 5c04858..82a9626 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -82,6 +82,8 @@ import org.apache.tomcat.util.res.StringManager;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -820,6 +822,8 @@ public class RemoteIpFilter extends GenericFilter {
 }
 }
 
+request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 145b095..9e78c0f 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#FORWARDED_REQUEST_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -651,6 +653,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index 1475ba7..6ed3172 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -96,4 +96,12 @@ public final class Constants {
  * the X-Forwarded-For HTTP header.
  */
 public static final String REMOTE_ADDR_ATTRIBUTE = 
"org.apache.tomcat.remoteAddr";
+
+/**
+ * The request attribute set by the RemoteIpFilter, RemoteIpValve (and may
+ * be set by other similar components) that identifies this request has 
been
+ * forwarded via one or more 

[tomcat] branch mark-forwarded-request/9.0.x created (now 7993b8b)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


  at 7993b8b  Better attribute name

This branch includes the following new commits:

 new c5b816d  Mark request as forwarded in RemoteIpValve/RemoteIpFilter
 new 7993b8b  Better attribute name

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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



[Bug 63556] Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63556

Michael Osipov  changed:

   What|Removed |Added

 Blocks||62496
 CC||micha...@apache.org


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=62496
[Bug 62496] Add possibility write remote user/auth type to response header
-- 
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 62496] Add possibility write remote user/auth type to response header

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62496

Michael Osipov  changed:

   What|Removed |Added

 Depends on||63556


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=63556
[Bug 63556] Mark request as forwarded in RemoteIpValve/RemoteIpFilter
-- 
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 63556] New: Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63556

Bug ID: 63556
   Summary: Mark request as forwarded in
RemoteIpValve/RemoteIpFilter
   Product: Tomcat 9
   Version: 9.0.x
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: micha...@apache.org
  Target Milestone: -

In some situations you'd like to know from a component whether your request has
been forwarded by a reverse proxy.

A real life usecase:

HTTPd => Tomcat; Tomcat does auth, logs in access.log => HTTPd => logs in
access.log, REMOTE_USER is empty. Logs are inconsistent.

If this flag is set AuthenticatorBase can check this and write
request#getRemoteUser() + auth method to the response headers which HTTPd can
picked up and make access.log consistent.

This is required by: 62496

A PR is in preparation.

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



[tomcat] branch mark-forwarded-request/9.0.x updated: Add bug id

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/mark-forwarded-request/9.0.x 
by this push:
 new 5ac2847  Add bug id
5ac2847 is described below

commit 5ac28479e2430f9cf132b858b9b6461ff65af66d
Author: Michael Osipov 
AuthorDate: Tue Jul 9 16:01:57 2019 +0200

Add bug id
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9c3b7b7..d95f6c1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -48,7 +48,7 @@
   
 
   
-XXX: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter (michaelo)
+63556: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter (michaelo)
   
  
   


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



[tomcat] branch mark-forwarded-request/8.5.x updated: Add bug id

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/mark-forwarded-request/8.5.x 
by this push:
 new b26dab2  Add bug id
b26dab2 is described below

commit b26dab253781fc5f54390c8ec8553d631b639542
Author: Michael Osipov 
AuthorDate: Tue Jul 9 16:01:57 2019 +0200

Add bug id
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cb2e02d..959544a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -48,7 +48,7 @@
   
 
   
-XXX: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter (michaelo)
+63556: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter (michaelo)
   
  
   


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



[GitHub] [tomcat] michael-o opened a new pull request #178: Bug 63556 - Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread GitBox
michael-o opened a new pull request #178: Bug 63556 - Mark request as forwarded 
in RemoteIpValve/RemoteIpFilter
URL: https://github.com/apache/tomcat/pull/178
 
 
   This is WIP, please review. I will squash, backport to 8.5.x and merge into 
both branches.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



svn commit: r34812 - /dev/tomcat/tomcat-9/v9.0.22/ /release/tomcat/tomcat-9/v9.0.22/

2019-07-09 Thread markt
Author: markt
Date: Tue Jul  9 14:08:14 2019
New Revision: 34812

Log:
Release Apache Tomcat 9.0.22

Added:
release/tomcat/tomcat-9/v9.0.22/
  - copied from r34811, dev/tomcat/tomcat-9/v9.0.22/
Removed:
dev/tomcat/tomcat-9/v9.0.22/


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



Nexus: Promotion Completed

2019-07-09 Thread Nexus Repository Manager
Message from: https://repository.apache.orgDeployer properties:"userAgent" = "maven-artifact/2.2.1 (Java 1.8.0_212; Windows 7 6.1)""userId" = "markt""ip" = "109.148.147.127"Details:The following artifacts have been promoted to the "Releases" [id=releases] repository/org/apache/tomcat/tomcat-i18n-de/9.0.22/tomcat-i18n-de-9.0.22.jar.asc(SHA1: e84ac93991f48c85caa10ccea78c28d694ee9dbe)/org/apache/tomcat/tomcat-i18n-de/9.0.22/tomcat-i18n-de-9.0.22.pom.asc(SHA1: 2afb8e31de41a3baf2cfb46195b0a4cf4cb860cb)/org/apache/tomcat/tomcat-i18n-de/9.0.22/tomcat-i18n-de-9.0.22.pom(SHA1: af040ce5e8bc675ce7cc34434651fb950f104bf6)/org/apache/tomcat/tomcat-i18n-de/9.0.22/tomcat-i18n-de-9.0.22.jar(SHA1: 0447351d32b168a6a1b05c6c7930fdf61e1ce178)/org/apache/tomcat/tomcat-jni/9.0.22/tomcat-jni-9.0.22.jar(SHA1: 47a3b5cbc2c01d346b06b01908a5aaa138a9d0e0)/org/apache/tomcat/tomcat-jni/9.0.22/tomcat-jni-9.0.22.pom.asc(SHA1: ea7a232fe7a892559fe7e9e63f9d0e857db745c8)/org/apache/tomcat/tomcat-jni/9.0.22/tomcat-jni-9.0.22.pom(SHA1: 901cf7781bbc2b5010be8bc1b3e04ad2e752f422)/org/apache/tomcat/tomcat-jni/9.0.22/tomcat-jni-9.0.22-sources.jar.asc(SHA1: 71b5adebccbf911352527121a40c1835bc641156)/org/apache/tomcat/tomcat-jni/9.0.22/tomcat-jni-9.0.22-sources.jar(SHA1: 1592049423220167c90acc5d434f2a15769bcd2b)/org/apache/tomcat/tomcat-jni/9.0.22/tomcat-jni-9.0.22.jar.asc(SHA1: 134c2a5b933cbd82ba5cde4f3da74170ec9df81a)/org/apache/tomcat/tomcat-juli/9.0.22/tomcat-juli-9.0.22.pom(SHA1: d0e3b2b2e0bb1be463f9d15d282da777ee4ae9a8)/org/apache/tomcat/tomcat-juli/9.0.22/tomcat-juli-9.0.22.pom.asc(SHA1: 8db1113cb2e30ebb4cfc6c2cab3790f9ea0c1b90)/org/apache/tomcat/tomcat-juli/9.0.22/tomcat-juli-9.0.22-sources.jar.asc(SHA1: 4558ecb05ad70c71d427db431a7f8887b8d1fe4e)/org/apache/tomcat/tomcat-juli/9.0.22/tomcat-juli-9.0.22-sources.jar(SHA1: c5752824a7df8c1a05b3c96c2bb0f29d1828dbc4)/org/apache/tomcat/tomcat-juli/9.0.22/tomcat-juli-9.0.22.jar(SHA1: c1ce57ee6bf944837773b0b3f8a7047c054fd718)/org/apache/tomcat/tomcat-juli/9.0.22/tomcat-juli-9.0.22.jar.asc(SHA1: f37825af0cc2227d8d379877bf48ccf80826525d)/org/apache/tomcat/tomcat-util/9.0.22/tomcat-util-9.0.22.jar(SHA1: 08601bd8c02293380d4525ba8777957f87c19508)/org/apache/tomcat/tomcat-util/9.0.22/tomcat-util-9.0.22.pom.asc(SHA1: b81e8e49d3c6bada2cfdd2121370c9287c5175d3)/org/apache/tomcat/tomcat-util/9.0.22/tomcat-util-9.0.22.jar.asc(SHA1: 0153c044f9b64c8fde5d63d39eea354a7f9de71c)/org/apache/tomcat/tomcat-util/9.0.22/tomcat-util-9.0.22-sources.jar.asc(SHA1: 73120ff3f0a527e19719f1b96edc2c09c83cf927)/org/apache/tomcat/tomcat-util/9.0.22/tomcat-util-9.0.22-sources.jar(SHA1: 35a524849095688c3e2719cc88ba91cbe2a6dad9)/org/apache/tomcat/tomcat-util/9.0.22/tomcat-util-9.0.22.pom(SHA1: 4149926dcc9866a8f55082d617adea43540a6a53)/org/apache/tomcat/tomcat-catalina/9.0.22/tomcat-catalina-9.0.22.pom(SHA1: 97117fb00e24a3af4a43c7df4b6ee0429c14c395)/org/apache/tomcat/tomcat-catalina/9.0.22/tomcat-catalina-9.0.22.jar(SHA1: f83ebe592ea642c7ce302b04e56bc961087b2144)/org/apache/tomcat/tomcat-catalina/9.0.22/tomcat-catalina-9.0.22-sources.jar.asc(SHA1: 5d5918c5ebf503a0c2493776d4c64e85c15d1fb4)/org/apache/tomcat/tomcat-catalina/9.0.22/tomcat-catalina-9.0.22-sources.jar(SHA1: 1f1549cf05d5c9781354f2b6e36071f4249e0a2c)/org/apache/tomcat/tomcat-catalina/9.0.22/tomcat-catalina-9.0.22.jar.asc(SHA1: d861e5ac1d3bbe32055aaf0262f2d2cb438b620a)/org/apache/tomcat/tomcat-catalina/9.0.22/tomcat-catalina-9.0.22.pom.asc(SHA1: 1b5042b92418bcc396432d8a884366eed9ce9b88)/org/apache/tomcat/tomcat-i18n-fr/9.0.22/tomcat-i18n-fr-9.0.22.pom(SHA1: eda6f7e9d242043d022c9c48b0bc96ff5e74599f)/org/apache/tomcat/tomcat-i18n-fr/9.0.22/tomcat-i18n-fr-9.0.22.jar.asc(SHA1: dd060e49412d0acc402d0d899fa4b469160c8086)/org/apache/tomcat/tomcat-i18n-fr/9.0.22/tomcat-i18n-fr-9.0.22.pom.asc(SHA1: 3e833da68858caea3e4baf1584fd5f85b9a34a43)/org/apache/tomcat/tomcat-i18n-fr/9.0.22/tomcat-i18n-fr-9.0.22.jar(SHA1: c734746fe14ebc0d881070af8a8158376e180c3c)/org/apache/tomcat/tomcat-i18n-cs/9.0.22/tomcat-i18n-cs-9.0.22.jar.asc(SHA1: 02fa9156485ab8e2910b08883a1efa5d963e38e2)/org/apache/tomcat/tomcat-i18n-cs/9.0.22/tomcat-i18n-cs-9.0.22.pom.asc(SHA1: ae29f3e6fadc9faf2f4cc911f5cb0e57b8965f27)/org/apache/tomcat/tomcat-i18n-cs/9.0.22/tomcat-i18n-cs-9.0.22.jar(SHA1: cfe33401dbd2e96a2cb740794d2a5184ad27fe28)/org/apache/tomcat/tomcat-i18n-cs/9.0.22/tomcat-i18n-cs-9.0.22.pom(SHA1: 73a77111cead98bfd5e8858273666353d30044c7)/org/apache/tomcat/tomcat-jdbc/9.0.22/tomcat-jdbc-9.0.22.pom.asc(SHA1: 9135fc7bb3d6d44f66122b4139845b0f5b12c28d)/org/apache/tomcat/tomcat-jdbc/9.0.22/tomcat-jdbc-9.0.22.jar(SHA1: 3a1168bb3c0343e469ab694cb79c22e61239ed3b)/org/apache/tomcat/tomcat-jdbc/9.0.22/tomcat-jdbc-9.0.22.pom(SHA1: c6ba9540e590877f5b7cc7265cc111a676d46ea5)/org/apache/tomcat/tomcat-jdbc/9.0.22/tomcat-jdbc-9.0.22.jar.asc(SHA1: bfc9f95d8151b26d9d2b45e8047ec57f6f43bd6c)/org/apache/tomcat/tomcat-jdbc/9.0.22/tomcat-jdbc-9.0.22-sources.jar.asc(SHA1: 

[Bug 63556] Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63556

--- Comment #1 from Michael Osipov  ---
PR delivered: https://github.com/apache/tomcat/pull/178

Will then back port.

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



[tomcat] 01/02: Clean-up. Javadoc, Spacing, unnecessary code, etc. No functional change

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2863d30dc5ef2d2a4fda64cbc00d0655bd74312f
Author: Mark Thomas 
AuthorDate: Tue Jul 9 12:18:53 2019 +0100

Clean-up. Javadoc, Spacing, unnecessary code, etc. No functional change
---
 java/org/apache/catalina/connector/Request.java | 462 
 1 file changed, 234 insertions(+), 228 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index a593be1..270219b 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -107,7 +107,6 @@ import org.apache.tomcat.util.res.StringManager;
 import org.ietf.jgss.GSSCredential;
 import org.ietf.jgss.GSSException;
 
-
 /**
  * Wrapper object for the Coyote request.
  *
@@ -151,9 +150,11 @@ implements HttpServletRequest {
 
 /**
  * Get the Coyote request.
+ *
+ * @return the Coyote request object
  */
 public org.apache.coyote.Request getCoyoteRequest() {
-return (this.coyoteRequest);
+return this.coyoteRequest;
 }
 
 
@@ -166,8 +167,7 @@ implements HttpServletRequest {
 /**
  * The string manager for this package.
  */
-protected static final StringManager sm =
-StringManager.getManager(Constants.Package);
+protected static final StringManager sm = 
StringManager.getManager(Request.class);
 
 
 /**
@@ -297,7 +297,8 @@ implements HttpServletRequest {
 
 
 /**
- * Cookies parsed flag.
+ * Cookie headers parsed flag. Indicates that the cookie headers have been
+ * parsed into ServerCookies.
  */
 protected boolean cookiesParsed = false;
 
@@ -309,7 +310,7 @@ implements HttpServletRequest {
 
 
 /**
- * The Subject associated with the current AccessControllerContext
+ * The Subject associated with the current AccessControlContext
  */
 protected transient Subject subject = null;
 
@@ -427,14 +428,13 @@ implements HttpServletRequest {
 
 protected Boolean asyncSupported = null;
 
-
 /**
  * Path parameters
  */
 protected Map pathParameters = new HashMap();
 
-// - Public Methods
 
+// - Public Methods
 
 protected void addPathParameter(String name, String value) {
 pathParameters.put(name, value);
@@ -573,14 +573,13 @@ implements HttpServletRequest {
 
 //  Request Methods
 
-
 /**
  * Associated Catalina connector.
  */
 protected Connector connector;
 
 /**
- * Return the Connector through which this Request was received.
+ * @return the Connector through which this Request was received.
  */
 public Connector getConnector() {
 return this.connector;
@@ -629,6 +628,8 @@ implements HttpServletRequest {
 
 /**
  * Get filter chain associated with the request.
+ *
+ * @return the associated filter chain
  */
 public FilterChain getFilterChain() {
 return this.filterChain;
@@ -645,7 +646,7 @@ implements HttpServletRequest {
 
 
 /**
- * Return the Host within which this Request is being processed.
+ * @return the Host within which this Request is being processed.
  */
 public Host getHost() {
 return ((Host) mappingData.host);
@@ -687,7 +688,7 @@ implements HttpServletRequest {
 protected MappingData mappingData = new MappingData();
 
 /**
- * Return mapping data.
+ * @return mapping data.
  */
 public MappingData getMappingData() {
 return mappingData;
@@ -699,8 +700,9 @@ implements HttpServletRequest {
  */
 protected RequestFacade facade = null;
 
+
 /**
- * Return the ServletRequest for which this object
+ * @return the ServletRequest for which this object
  * is the facade.  This method must be implemented by a subclass.
  */
 public HttpServletRequest getRequest() {
@@ -717,7 +719,7 @@ implements HttpServletRequest {
 protected org.apache.catalina.connector.Response response = null;
 
 /**
- * Return the Response with which this Request is associated.
+ * @return the Response with which this Request is associated.
  */
 public org.apache.catalina.connector.Response getResponse() {
 return this.response;
@@ -733,7 +735,7 @@ implements HttpServletRequest {
 }
 
 /**
- * Return the input stream associated with this Request.
+ * @return the input stream associated with this Request.
  */
 public InputStream getStream() {
 if (inputStream == null) {
@@ -748,7 +750,7 @@ implements HttpServletRequest {
 protected B2CConverter URIConverter = null;
 
 /**
- * Return the URI converter.

[tomcat] branch 7.0.x updated (f7c73a2 -> 15d7f85)

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from f7c73a2  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=55969
 new 2863d30  Clean-up. Javadoc, Spacing, unnecessary code, etc. No 
functional change
 new 15d7f85  Back-port NPE fix

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/catalina/connector/Request.java | 501 
 1 file changed, 251 insertions(+), 250 deletions(-)


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



[tomcat] branch 8.5.x updated: Clean-up. Spacing, unnecessary code, etc. No functional change

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 83911c2  Clean-up. Spacing,unnecessary code, etc. No functional change
83911c2 is described below

commit 83911c2698d8e140ea35d0d979eb1a38de0c0dbe
Author: Mark Thomas 
AuthorDate: Tue Jul 9 12:18:23 2019 +0100

Clean-up. Spacing,unnecessary code, etc. No functional change
---
 java/org/apache/catalina/connector/Request.java | 134 
 1 file changed, 44 insertions(+), 90 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 48786cd..0fdfc63 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -740,6 +740,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 return mappingData.wrapper;
 }
 
+
 /**
  * @param wrapper The newly associated Wrapper
  * @deprecated Use setters on {@link #getMappingData() MappingData} object.
@@ -755,7 +756,6 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 
 // - Request Public Methods
 
-
 /**
  * Create and return a ServletInputStream to read the content
  * associated with this Request.
@@ -764,7 +764,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
  * @exception IOException if an input/output error occurs
  */
 public ServletInputStream createInputStream()
-throws IOException {
+throws IOException {
 if (inputStream == null) {
 inputStream = new CoyoteInputStream(inputBuffer);
 }
@@ -872,8 +872,6 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 
 // - ServletRequest Methods
 
-
-
 /**
  * @return the specified request attribute if it exists; otherwise, return
  * null.
@@ -891,7 +889,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 Object attr = attributes.get(name);
 
 if (attr != null) {
-return(attr);
+return attr;
 }
 
 attr = coyoteRequest.getAttribute(name);
@@ -1065,8 +1063,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 public ServletInputStream getInputStream() throws IOException {
 
 if (usingReader) {
-throw new IllegalStateException
-(sm.getString("coyoteRequest.getInputStream.ise"));
+throw new 
IllegalStateException(sm.getString("coyoteRequest.getInputStream.ise"));
 }
 
 usingInputStream = true;
@@ -1228,8 +1225,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 public BufferedReader getReader() throws IOException {
 
 if (usingInputStream) {
-throw new IllegalStateException
-(sm.getString("coyoteRequest.getReader.ise"));
+throw new 
IllegalStateException(sm.getString("coyoteRequest.getReader.ise"));
 }
 
 usingReader = true;
@@ -1238,7 +1234,6 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 reader = new CoyoteReader(inputBuffer);
 }
 return reader;
-
 }
 
 
@@ -1277,8 +1272,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 @Override
 public String getRemoteAddr() {
 if (remoteAddr == null) {
-coyoteRequest.action
-(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, 
coyoteRequest);
 remoteAddr = coyoteRequest.remoteAddr().toString();
 }
 return remoteAddr;
@@ -1294,8 +1288,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 if (!connector.getEnableLookups()) {
 remoteHost = getRemoteAddr();
 } else {
-coyoteRequest.action
-(ActionCode.REQ_HOST_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_HOST_ATTRIBUTE, 
coyoteRequest);
 remoteHost = coyoteRequest.remoteHost().toString();
 }
 }
@@ -1309,8 +1302,7 @@ public class Request implements 
org.apache.catalina.servlet4preview.http.HttpSer
 @Override
 public int getRemotePort(){
 if (remotePort == -1) {
-coyoteRequest.action
-(ActionCode.REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_REMOTEPORT_ATTRIBUTE, 
coyoteRequest);
 

[tomcat] branch master updated: Code clean-up. Space, indents, {}, wrapping. No functional change.

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new c9947ff  Code clean-up. Space, indents, {}, wrapping. No functional 
change.
c9947ff is described below

commit c9947ff4f9dd32bfb515e895a4ec33737faaa6d0
Author: Mark Thomas 
AuthorDate: Tue Jul 9 12:17:03 2019 +0100

Code clean-up. Space, indents, {}, wrapping. No functional change.
---
 java/org/apache/catalina/connector/Request.java | 89 ++---
 1 file changed, 34 insertions(+), 55 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 8a4a459..367a78b 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -744,7 +744,7 @@ public class Request implements HttpServletRequest {
  * @exception IOException if an input/output error occurs
  */
 public ServletInputStream createInputStream()
-throws IOException {
+throws IOException {
 if (inputStream == null) {
 inputStream = new CoyoteInputStream(inputBuffer);
 }
@@ -852,8 +852,6 @@ public class Request implements HttpServletRequest {
 
 // - ServletRequest Methods
 
-
-
 /**
  * @return the specified request attribute if it exists; otherwise, return
  * null.
@@ -1045,8 +1043,7 @@ public class Request implements HttpServletRequest {
 public ServletInputStream getInputStream() throws IOException {
 
 if (usingReader) {
-throw new IllegalStateException
-(sm.getString("coyoteRequest.getInputStream.ise"));
+throw new 
IllegalStateException(sm.getString("coyoteRequest.getInputStream.ise"));
 }
 
 usingInputStream = true;
@@ -1208,8 +1205,7 @@ public class Request implements HttpServletRequest {
 public BufferedReader getReader() throws IOException {
 
 if (usingInputStream) {
-throw new IllegalStateException
-(sm.getString("coyoteRequest.getReader.ise"));
+throw new 
IllegalStateException(sm.getString("coyoteRequest.getReader.ise"));
 }
 
 // InputBuffer has no easily accessible reference chain to the Context
@@ -1275,8 +1271,7 @@ public class Request implements HttpServletRequest {
 @Override
 public String getRemoteAddr() {
 if (remoteAddr == null) {
-coyoteRequest.action
-(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, 
coyoteRequest);
 remoteAddr = coyoteRequest.remoteAddr().toString();
 }
 return remoteAddr;
@@ -1292,8 +1287,7 @@ public class Request implements HttpServletRequest {
 if (!connector.getEnableLookups()) {
 remoteHost = getRemoteAddr();
 } else {
-coyoteRequest.action
-(ActionCode.REQ_HOST_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_HOST_ATTRIBUTE, 
coyoteRequest);
 remoteHost = coyoteRequest.remoteHost().toString();
 }
 }
@@ -1307,8 +1301,7 @@ public class Request implements HttpServletRequest {
 @Override
 public int getRemotePort(){
 if (remotePort == -1) {
-coyoteRequest.action
-(ActionCode.REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_REMOTEPORT_ATTRIBUTE, 
coyoteRequest);
 remotePort = coyoteRequest.getRemotePort();
 }
 return remotePort;
@@ -1321,8 +1314,7 @@ public class Request implements HttpServletRequest {
 @Override
 public String getLocalName(){
 if (localName == null) {
-coyoteRequest.action
-(ActionCode.REQ_LOCAL_NAME_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_LOCAL_NAME_ATTRIBUTE, 
coyoteRequest);
 localName = coyoteRequest.localName().toString();
 }
 return localName;
@@ -1335,8 +1327,7 @@ public class Request implements HttpServletRequest {
 @Override
 public String getLocalAddr(){
 if (localAddr == null) {
-coyoteRequest.action
-(ActionCode.REQ_LOCAL_ADDR_ATTRIBUTE, coyoteRequest);
+coyoteRequest.action(ActionCode.REQ_LOCAL_ADDR_ATTRIBUTE, 
coyoteRequest);
 localAddr = coyoteRequest.localAddr().toString();
 }
 return localAddr;
@@ -1350,8 +1341,7 @@ public class Request implements HttpServletRequest {
 @Override
 public int getLocalPort(){
 if (localPort == -1){
-coyoteRequest.action
-(ActionCode.REQ_LOCALPORT_ATTRIBUTE, 

[tomcat] 02/02: Back-port NPE fix

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 15d7f85898da909d7b94c852256b97eda44b1a1b
Author: Mark Thomas 
AuthorDate: Tue Jul 9 12:25:48 2019 +0100

Back-port NPE fix

Also some additional clean-up spotted while looking for NPE fixes.
---
 java/org/apache/catalina/connector/Request.java | 41 +++--
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 270219b..71e381e 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1275,6 +1275,7 @@ implements HttpServletRequest {
 @Deprecated
 public String getRealPath(String path) {
 
+Context context = getContext();
 if (context == null) {
 return null;
 }
@@ -1382,6 +1383,7 @@ implements HttpServletRequest {
 @Override
 public RequestDispatcher getRequestDispatcher(String path) {
 
+Context context = getContext();
 if (context == null) {
 return null;
 }
@@ -1587,6 +1589,7 @@ implements HttpServletRequest {
  */
 private void notifyAttributeAssigned(String name, Object value,
 Object oldValue) {
+Context context = getContext();
 if (context == null) {
 return;
 }
@@ -1618,9 +1621,9 @@ implements HttpServletRequest {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
-
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
 // Error valve will pick this exception up and display it to 
user
 attributes.put(RequestDispatcher.ERROR_EXCEPTION, t);
+
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
 }
 }
 }
@@ -1633,6 +1636,7 @@ implements HttpServletRequest {
  * @param value Attribute value
  */
 private void notifyAttributeRemoved(String name, Object value) {
+Context context = getContext();
 Object listeners[] = context.getApplicationEventListeners();
 if ((listeners == null) || (listeners.length == 0)) {
 return;
@@ -1650,9 +1654,9 @@ implements HttpServletRequest {
 listener.attributeRemoved(event);
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
-
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
 // Error valve will pick this exception up and display it to 
user
 attributes.put(RequestDispatcher.ERROR_EXCEPTION, t);
+
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
 }
 }
 }
@@ -2013,7 +2017,7 @@ implements HttpServletRequest {
  * @param principal The user Principal
  */
 public void setUserPrincipal(final Principal principal) {
-if (Globals.IS_SECURITY_ENABLED) {
+if (Globals.IS_SECURITY_ENABLED && principal != null) {
 if (subject == null) {
 final HttpSession session = getSession(false);
 if (session == null) {
@@ -2334,6 +2338,7 @@ implements HttpServletRequest {
 @Override
 public String getPathTranslated() {
 
+Context context = getContext();
 if (context == null) {
 return null;
 }
@@ -2398,22 +2403,6 @@ implements HttpServletRequest {
 }
 
 
-/**
- * Reconstructs the URL the client used to make the request.
- * The returned URL contains a protocol, server name, port
- * number, and server path, but it does not include query
- * string parameters.
- * 
- * Because this method returns a StringBuffer,
- * not a String, you can modify the URL easily,
- * for example, to append query parameters.
- * 
- * This method is useful for creating redirect messages and
- * for reporting errors.
- *
- * @return A StringBuffer object containing the
- *  reconstructed URL
- */
 @Override
 public StringBuffer getRequestURL() {
 
@@ -2547,6 +2536,7 @@ implements HttpServletRequest {
 return false;
 }
 
+Context context = getContext();
 if (context == null) {
 return false;
 }
@@ -2602,6 +2592,7 @@ implements HttpServletRequest {
 }
 
 // Identify the Realm we will use for checking role assignments
+Context context = getContext();
 if (context == null) {
 return false;
 }
@@ -2682,6 +2673,7 @@ implements HttpServletRequest {
 requestedSessionId = newSessionId;
 }
 
+Context context = getContext();
 if (context != null &&

Re: JDK 13 , JDK 14 & Valhalla Early Access builds are available.

2019-07-09 Thread Mark Thomas
I ran the unit tests for master with 13-ea28 and 14-ea04 on Linux
without any failures or errors.

Mark


On 08/07/2019 14:04, Rory O'Donnell wrote:
>  Hi Mark,
> 
> **OpenJDK* 13 Early Access build **28 is now available **at : -
> jdk.java.net/13/*
> 
>   * These early-access, open-source builds are provided under the GNU
> General Public License, version 2, with the Classpath Exception
> .
>   * Changes in this build 28 [1]
> 
> 
> *Reminder of a change in b24 - A jrt URI can only encode paths to files
> in /modules tree **(JDK-8224946
> )*
> 
> A |jrt| URL is a hierarchical URI with syntax |jrt:/[$MODULE[/$PATH]]|.
> When using the |jrt| file system, a |java.net.URI| object can be created
> with the |java.nio.file.Path::toUri| method to encode a normalized path
> to a file in the |/modules| tree. A |jrt| URL cannot encode a path to a
> file in the |/packages| tree. The |jrt| file system provider has changed
> in this release so that |toUri| fails with |IOError| when it is not
> possible to encode the file path as a jrt URI. *This change may impact
> tools have been making use of URLs that are not compliant with the
> syntax. Tools with paths to files in **|/packages|**can use the
> **|toRealPath()|**method to obtain the real path (in **|/modules|**)
> before attempting to convert the file path to a URI.*
> 
> *OpenJDK 14 **Early Access build 4 **is now available **at : -
> jdk.java.net/14/*
> 
>   * These early-access, open-source builds are provided under the GNU
> General Public License, version 2, with the Classpath Exception
> .
>   * Changes in this build [2]
> 
> 
> *Project Valhalla "L-World Inline Types" Early-Access Builds*
> 
>   * Build jdk-14-valhalla+1-8
>   * These early-access builds are provided under the GNU General Public
> License, version 2, with the Classpath Exception
> .
>   * Please send feedback via e-mail to valhalla-...@openjdk.java.net
> . To send e-mail to this
> address you must first subscribe to the mailing list.
> 
> 
> *The Skara tooling is now open source *[3]
> we are happy to announce that the tooling for project Skara is now open
> source and available at
> 
>   * https://github.com/openjdk/skara 
> 
> The Skara tooling includes both server-side tools (so called "bots") as
> well as several command-line tools **
> If you have any questions, feedback etc. send them to Skara mailing list [4]
> 
> Rgds, Rory
> 
> 
> [1] JDK 13 - Changes in b28 here
> 
> [2] JDK 14 - Changes in b4 here
> 
> [3] https://mail.openjdk.java.net/pipermail/skara-dev/2019-June/47.html
> [4] https://mail.openjdk.java.net/mailman/listinfo/skara-dev
> 
> -- 
> Rgds, Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA, Dublin, Ireland
> 


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



Re: JDK 13 , JDK 14 & Valhalla Early Access builds are available.

2019-07-09 Thread Rory O'Donnell

Thanks Mark !

On 09/07/2019 12:37, Mark Thomas wrote:

I ran the unit tests for master with 13-ea28 and 14-ea04 on Linux
without any failures or errors.

Mark


On 08/07/2019 14:04, Rory O'Donnell wrote:

  Hi Mark,

**OpenJDK* 13 Early Access build **28 is now available **at : -
jdk.java.net/13/*

   * These early-access, open-source builds are provided under the GNU
 General Public License, version 2, with the Classpath Exception
 .
   * Changes in this build 28 [1]


*Reminder of a change in b24 - A jrt URI can only encode paths to files
in /modules tree **(JDK-8224946
)*

A |jrt| URL is a hierarchical URI with syntax |jrt:/[$MODULE[/$PATH]]|.
When using the |jrt| file system, a |java.net.URI| object can be created
with the |java.nio.file.Path::toUri| method to encode a normalized path
to a file in the |/modules| tree. A |jrt| URL cannot encode a path to a
file in the |/packages| tree. The |jrt| file system provider has changed
in this release so that |toUri| fails with |IOError| when it is not
possible to encode the file path as a jrt URI. *This change may impact
tools have been making use of URLs that are not compliant with the
syntax. Tools with paths to files in **|/packages|**can use the
**|toRealPath()|**method to obtain the real path (in **|/modules|**)
before attempting to convert the file path to a URI.*

*OpenJDK 14 **Early Access build 4 **is now available **at : -
jdk.java.net/14/*

   * These early-access, open-source builds are provided under the GNU
 General Public License, version 2, with the Classpath Exception
 .
   * Changes in this build [2]


*Project Valhalla "L-World Inline Types" Early-Access Builds*

   * Build jdk-14-valhalla+1-8
   * These early-access builds are provided under the GNU General Public
 License, version 2, with the Classpath Exception
 .
   * Please send feedback via e-mail to valhalla-...@openjdk.java.net
 . To send e-mail to this
 address you must first subscribe to the mailing list.


*The Skara tooling is now open source *[3]
we are happy to announce that the tooling for project Skara is now open
source and available at

   * https://github.com/openjdk/skara 

The Skara tooling includes both server-side tools (so called "bots") as
well as several command-line tools **
If you have any questions, feedback etc. send them to Skara mailing list [4]

Rgds, Rory


[1] JDK 13 - Changes in b28 here

[2] JDK 14 - Changes in b4 here

[3] https://mail.openjdk.java.net/pipermail/skara-dev/2019-June/47.html
[4] https://mail.openjdk.java.net/mailman/listinfo/skara-dev

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



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


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


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



Re: Git repo for Tomcat Site

2019-07-09 Thread Violeta Georgieva
На вт, 9.07.2019 г. в 11:45 ч. Mark Thomas  написа:
>
> On 09/07/2019 05:29, Igal Sapir wrote:
> > Can we move the Tomcat site to Git?
>
> Yes. ASF infra supports both svnpubsub and gitpubsub for websites. There
> will need to be a little co-ordination with infra as we'd need to switch
> where the source for the site is pulled from.
>
> On the plus side, Tomcat site svn repo is not mirrored to git so we
> don't need to worry about any of that.
>
> I'll look into to the migration process and figure out exactly what is
> involved.
>
> > Possibly to a repo named "tomcat-site"?
>
> That makes sense.
>
> In terms of when, I'd suggest after the 9.0.x and 8.5.x releases have
> completed. There is usually a quietish period of ~3 weeks between
> releases when the website doesn't update that much. I think it makes
> sense to migrate then.

I plan to prepare Tomcat 7 for release this week.

Regards,
Violeta

>
> All of this is assuming there are no objections to moving. If there are
> any objections please speak up now so we can discuss any concerns and
> figure out a way forward everyone is happy with.
>
> > I'd be happy to make the required changes per prior emails so that we
> > can publish the new design in time for ACNA.
>
> Migration to Git and a new design are two separate issues. I'd be happy
> to see both proceed but I suggest we discuss them separately. I suggest
> you start a new thread for the discussion about moving to a new design -
> perhaps with a link to a demo of the latest proposal so we can remind
> ourselves of what it looks like.
>
> Mark
>
>
> >
> > Thoughts?
> >
> > Igal
> >
> >
> > -
> > 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: Git repo for Tomcat Site

2019-07-09 Thread Mark Thomas
On 09/07/2019 13:09, Violeta Georgieva wrote:
> 
> 
> На вт, 9.07.2019 г. в 11:45 ч. Mark Thomas  > написа:
>>
>> On 09/07/2019 05:29, Igal Sapir wrote:
>> > Can we move the Tomcat site to Git?
>>
>> Yes. ASF infra supports both svnpubsub and gitpubsub for websites. There
>> will need to be a little co-ordination with infra as we'd need to switch
>> where the source for the site is pulled from.
>>
>> On the plus side, Tomcat site svn repo is not mirrored to git so we
>> don't need to worry about any of that.
>>
>> I'll look into to the migration process and figure out exactly what is
>> involved.
>>
>> > Possibly to a repo named "tomcat-site"?
>>
>> That makes sense.
>>
>> In terms of when, I'd suggest after the 9.0.x and 8.5.x releases have
>> completed. There is usually a quietish period of ~3 weeks between
>> releases when the website doesn't update that much. I think it makes
>> sense to migrate then.
> 
> I plan to prepare Tomcat 7 for release this week.

Cool.

I've been looking into the migration and it should be easy so waiting
until after a 7.0.x release shouldn't be an issue.

In short, the steps are:

- Create a new Git repo (we can do this via the self-service portal)
- Import the content (we can do this)
- Switch the source from svn to git (infra / I can do this)
- Move the old svn source to the attic

I think the big question at this point is do we want to try and import
history? I'm leaning towards no because:
- we have it in svn if we need it
- the site doesn't have the same requirements for looking at history as
  the source
- with the Javadocs changing for every release there is a LOT of history

If the consensus is that we should include history then I think it would
be worth running some local experiments to see how long it would take to
construct.

Mark


> 
> Regards,
> Violeta
> 
>>
>> All of this is assuming there are no objections to moving. If there are
>> any objections please speak up now so we can discuss any concerns and
>> figure out a way forward everyone is happy with.
>>
>> > I'd be happy to make the required changes per prior emails so that we
>> > can publish the new design in time for ACNA.
>>
>> Migration to Git and a new design are two separate issues. I'd be happy
>> to see both proceed but I suggest we discuss them separately. I suggest
>> you start a new thread for the discussion about moving to a new design -
>> perhaps with a link to a demo of the latest proposal so we can remind
>> ourselves of what it looks like.
>>
>> Mark
>>
>>
>> >
>> > Thoughts?
>> >
>> > Igal
>> >
>> >
>> > -
>> > 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



[GitHub] [tomcat] markt-asf commented on issue #178: Bug 63556 - Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread GitBox
markt-asf commented on issue #178: Bug 63556 - Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter
URL: https://github.com/apache/tomcat/pull/178#issuecomment-509663648
 
 
   Only a couple of minor comments.
   
   - We try and keep the changelog to a maximum width of 80 chars. We probably 
don't need to these days but convention for that file seems to be keep to 80 
chars.
   - Why the constant in org.apache.coyote.Constants? As far as I can tell all 
uses of this constant are (and will be) in org.apache.catalina
   
   Otherwise, looks good.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



Nexus: Promotion Completed

2019-07-09 Thread Nexus Repository Manager
Message from: https://repository.apache.orgDeployer properties:"userAgent" = "maven-artifact/2.2.1 (Java 1.7.0_80; Windows 7 6.1)""userId" = "markt""ip" = "109.148.147.127"Details:The following artifacts have been promoted to the "Releases" [id=releases] repository/org/apache/tomcat/tomcat-jni/8.5.43/tomcat-jni-8.5.43.jar.asc(SHA1: 3c580888b635cd3ecbc20b873b7e34b8dcfc37c8)/org/apache/tomcat/tomcat-jni/8.5.43/tomcat-jni-8.5.43.jar(SHA1: a9dd82f531fbcf79ff55933f104c7155aa40a5db)/org/apache/tomcat/tomcat-jni/8.5.43/tomcat-jni-8.5.43-sources.jar(SHA1: 0c2ce68690dd1f354abe27dbef0d6aa82388e29b)/org/apache/tomcat/tomcat-jni/8.5.43/tomcat-jni-8.5.43.pom(SHA1: 6daaa03f62a59302110f25d2e9a2c1efe35af9e9)/org/apache/tomcat/tomcat-jni/8.5.43/tomcat-jni-8.5.43.pom.asc(SHA1: 95762ba82dc4d7f881ff15277620ea50613e2f04)/org/apache/tomcat/tomcat-jni/8.5.43/tomcat-jni-8.5.43-sources.jar.asc(SHA1: 900a843c6564ad4a62731bd80732100b07cef987)/org/apache/tomcat/tomcat-juli/8.5.43/tomcat-juli-8.5.43-sources.jar.asc(SHA1: c9191119042c28fddf70f4e812693653459febed)/org/apache/tomcat/tomcat-juli/8.5.43/tomcat-juli-8.5.43.jar(SHA1: 5e0d9d997543f74b2d707a1a616d4b680807ca11)/org/apache/tomcat/tomcat-juli/8.5.43/tomcat-juli-8.5.43.pom.asc(SHA1: 829359e1159d5881d7893bd2f540ece7fc4da64f)/org/apache/tomcat/tomcat-juli/8.5.43/tomcat-juli-8.5.43-sources.jar(SHA1: a1bfeaf30d150e5b8f100c0738746b111ed7)/org/apache/tomcat/tomcat-juli/8.5.43/tomcat-juli-8.5.43.pom(SHA1: 3ea5070c3f0eaeee40c49180cd4235603a9f4d52)/org/apache/tomcat/tomcat-juli/8.5.43/tomcat-juli-8.5.43.jar.asc(SHA1: b725b93b3e0955aa7963056f863b461c5468bf13)/org/apache/tomcat/tomcat-util/8.5.43/tomcat-util-8.5.43-sources.jar.asc(SHA1: 258d49b07603d837781a45003dcec1ae1d4708bb)/org/apache/tomcat/tomcat-util/8.5.43/tomcat-util-8.5.43.pom(SHA1: 0fc88efaa57a110339e3f21657e4c32ac8db0550)/org/apache/tomcat/tomcat-util/8.5.43/tomcat-util-8.5.43.jar(SHA1: 57a04391851449b75960b073e90fa748daaef24f)/org/apache/tomcat/tomcat-util/8.5.43/tomcat-util-8.5.43.pom.asc(SHA1: 7e855145def7754093f02abfa66f9facdf9e5d20)/org/apache/tomcat/tomcat-util/8.5.43/tomcat-util-8.5.43-sources.jar(SHA1: 2eb1a6bad82d02ee52cb9b811169db9a9a579e2b)/org/apache/tomcat/tomcat-util/8.5.43/tomcat-util-8.5.43.jar.asc(SHA1: 537f4c16b0e3b6a2a1a4e6a6708630aaf606cd72)/org/apache/tomcat/tomcat-catalina/8.5.43/tomcat-catalina-8.5.43.jar(SHA1: c42464d69b529a203320ec715ac2d1198669d96c)/org/apache/tomcat/tomcat-catalina/8.5.43/tomcat-catalina-8.5.43.jar.asc(SHA1: 13f86ab11285214f1d930cfa37279f6593e5be39)/org/apache/tomcat/tomcat-catalina/8.5.43/tomcat-catalina-8.5.43.pom.asc(SHA1: bedd16062ce38c750ef33c24c7fc1a6b22abcae9)/org/apache/tomcat/tomcat-catalina/8.5.43/tomcat-catalina-8.5.43-sources.jar.asc(SHA1: b2dad88529266984c8281849c985bb43807bdbdc)/org/apache/tomcat/tomcat-catalina/8.5.43/tomcat-catalina-8.5.43.pom(SHA1: f8d67d11846cf982b8770083eeb1d0c8b88662fc)/org/apache/tomcat/tomcat-catalina/8.5.43/tomcat-catalina-8.5.43-sources.jar(SHA1: cd302b216d6c9195be4802ad5c86d818837f9261)/org/apache/tomcat/tomcat-catalina-ws/8.5.43/tomcat-catalina-ws-8.5.43.jar(SHA1: 2c944c6f80593f5a72908969bb82d485d018cd78)/org/apache/tomcat/tomcat-catalina-ws/8.5.43/tomcat-catalina-ws-8.5.43.pom.asc(SHA1: f39ca7450f70fc9b5d3bb8c154d05d6b7edd62bd)/org/apache/tomcat/tomcat-catalina-ws/8.5.43/tomcat-catalina-ws-8.5.43.pom(SHA1: 71f0399f35e6f87fb19f284cc8afd5558c9dff23)/org/apache/tomcat/tomcat-catalina-ws/8.5.43/tomcat-catalina-ws-8.5.43-sources.jar.asc(SHA1: 242d1aa7d03ad420ef03ddcc0194c37f693a42e9)/org/apache/tomcat/tomcat-catalina-ws/8.5.43/tomcat-catalina-ws-8.5.43.jar.asc(SHA1: 46d9f63859f65672d89d4aafcef9e15133f3bcbb)/org/apache/tomcat/tomcat-catalina-ws/8.5.43/tomcat-catalina-ws-8.5.43-sources.jar(SHA1: d0600f4fcc5d06adf2209e0c4ee88d3fe1548dee)/org/apache/tomcat/tomcat-i18n-fr/8.5.43/tomcat-i18n-fr-8.5.43.jar(SHA1: 897774a71809cafa31d2bd715dbf3100148acdd4)/org/apache/tomcat/tomcat-i18n-fr/8.5.43/tomcat-i18n-fr-8.5.43.jar.asc(SHA1: c91bf6d2fc9f3a9674c7d284e44c4c9b0181d3e2)/org/apache/tomcat/tomcat-i18n-fr/8.5.43/tomcat-i18n-fr-8.5.43.pom.asc(SHA1: bbedd7f58d4636ac5b0810929e7effb207f2a01d)/org/apache/tomcat/tomcat-i18n-fr/8.5.43/tomcat-i18n-fr-8.5.43.pom(SHA1: d2f1f81a090f7cf065cd0f0884164da7ed0fd334)/org/apache/tomcat/tomcat-jdbc/8.5.43/tomcat-jdbc-8.5.43.pom.asc(SHA1: a85ca25fae2f6bcae05ab82d758ab0e3263f3be6)/org/apache/tomcat/tomcat-jdbc/8.5.43/tomcat-jdbc-8.5.43.jar(SHA1: 9c0c77ff013df5407c446ac4f08ccc2c623545b1)/org/apache/tomcat/tomcat-jdbc/8.5.43/tomcat-jdbc-8.5.43.pom(SHA1: 104e5cca4fa979f5cfcb6a18ceb72b113522936b)/org/apache/tomcat/tomcat-jdbc/8.5.43/tomcat-jdbc-8.5.43-sources.jar.asc(SHA1: 839f1f446e7b165f3111af1a1e18cca98ad9a6d3)/org/apache/tomcat/tomcat-jdbc/8.5.43/tomcat-jdbc-8.5.43-sources.jar(SHA1: c44a085a8ec696abe4f5a0d85961d126d4adfa98)/org/apache/tomcat/tomcat-jdbc/8.5.43/tomcat-jdbc-8.5.43.jar.asc(SHA1: e871a8196a082ebb868c7c71362944b55d1f0a75)/org/apache/tomcat/embed/tomcat-embed-core/8.5.43/tomcat-embed-core-8.5.43.jar(SHA1: 

[GitHub] [tomcat] michael-o commented on issue #178: Bug 63556 - Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread GitBox
michael-o commented on issue #178: Bug 63556 - Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter
URL: https://github.com/apache/tomcat/pull/178#issuecomment-509669901
 
 
   * Will fix `changelog.xml`
   * Indeed, I have blindly copied from `REMOTE_ADDR_ATTRIBUTE`. I can drop 
`org.apache.coyote.Constants.REQUEST_FORWARDED_ATTRIBUTE` and move the difition 
to `org.apache.catalina.Globals` directly. Is that what you meant?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[tomcat] branch master updated: Fix typo

2019-07-09 Thread violetagg
This is an automated email from the ASF dual-hosted git repository.

violetagg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 1ccb893  Fix typo
1ccb893 is described below

commit 1ccb8934b916a1118a9169afbf5a22487540362e
Author: Violeta Georgieva 
AuthorDate: Tue Jul 9 17:41:03 2019 +0300

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c86f2ff..5fc543b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -128,7 +128,7 @@
   
   
 Fix to avoid the possibility of long poll times for individual pollers
-when using mutliple pollers with APR. (markt)
+when using multiple pollers with APR. (markt)
   
   
 Refactor the fix for 63205 so it only applies when using


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



[tomcat] branch 8.5.x updated: Fix typo

2019-07-09 Thread violetagg
This is an automated email from the ASF dual-hosted git repository.

violetagg pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new c57e930  Fix typo
c57e930 is described below

commit c57e930dfbb14e55579df2fc01ab9db641d855f6
Author: Violeta Georgieva 
AuthorDate: Tue Jul 9 17:41:03 2019 +0300

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b34494f..7ff5b25 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -148,7 +148,7 @@
   
   
 Fix to avoid the possibility of long poll times for individual pollers
-when using mutliple pollers with APR. (markt)
+when using multiple pollers with APR. (markt)
   
   
 Refactor the fix for 63205 so it only applies when using


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



[tomcat] 02/03: Align Javadoc with 8.5.x

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit c260e6add354909d13a874d62c8532affc778eb5
Author: Mark Thomas 
AuthorDate: Tue Jul 9 15:57:27 2019 +0100

Align Javadoc with 8.5.x
---
 java/org/apache/catalina/valves/RemoteIpValve.java | 62 --
 1 file changed, 34 insertions(+), 28 deletions(-)

diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 5b9e921..24e0065 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -49,6 +49,7 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * 
  * If the incoming request.getRemoteAddr() matches the valve's 
list
  * of internal or trusted proxies:
+ * 
  * 
  * Loop on the comma delimited list of IPs and hostnames passed by the 
preceding load balancer or proxy in the given request's Http
  * header named $remoteIpHeader (default value 
x-forwarded-for). Values are processed in right-to-left order.
@@ -64,10 +65,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
  * 
- * 
- * 
- * Configuration parameters:
  * 
+ * Configuration parameters
  * 
  * RemoteIpValve property
  * Description
@@ -145,8 +144,6 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * 443
  * 
  * 
- * 
- * 
  * 
  * This Valve may be attached to any Container, depending on the granularity 
of the filtering you wish to perform.
  * 
@@ -158,24 +155,23 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * RemoteIpValve uses regular expression to configure 
internalProxies and trustedProxies in the same
  * fashion as {@link RequestFilterValve} does.
  * 
- * 
+ * 
  * 
  * Sample with internal proxies
  * 
  * 
  * RemoteIpValve configuration:
  * 
- * 
+ * 
  * Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   protocolHeader="x-forwarded-proto"
- *   /
- * 
- * Request values:
+ *   /
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpValve
@@ -217,27 +213,27 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * 443
  * 
  * 
+ * 
  * Note : x-forwarded-by header is null because only internal 
proxies as been traversed by the request.
  * x-forwarded-by is null because all the proxies are trusted or 
internal.
  * 
- * 
+ * 
  * 
  * Sample with trusted proxies
  * 
  * 
  * RemoteIpValve configuration:
  * 
- * 
+ * 
  * Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   trustedProxies="proxy1|proxy2"
- *   /
- * 
- * Request values:
+ *   /
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpValve
@@ -259,27 +255,27 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * proxy1, proxy2
  * 
  * 
+ * 
  * Note : proxy1 and proxy2 are both trusted proxies 
that come in x-forwarded-for header, they both
  * are migrated in x-forwarded-by header. 
x-forwarded-by is null because all the proxies are trusted or 
internal.
  * 
- * 
+ * 
  * 
  * Sample with internal and trusted proxies
  * 
  * 
  * RemoteIpValve configuration:
  * 
- * 
+ * 
  * Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   trustedProxies="proxy1|proxy2"
- *   /
- * 
- * Request values:
+ *   /
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpValve
@@ -301,28 +297,28 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * proxy1, proxy2
  * 
  * 
+ * 
  * Note : proxy1 and proxy2 are both trusted proxies 
that come in x-forwarded-for header, they both
  * are migrated in x-forwarded-by header. As 
192.168.0.10 is an internal proxy, it does not appear in
  * x-forwarded-by. x-forwarded-by is null because 
all the proxies are trusted or internal.
  * 
- * 
+ * 
  * 
  * Sample with an untrusted proxy
  * 
  * 
  * RemoteIpValve configuration:
  * 
- * 
+ * 
  * Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   trustedProxies="proxy1|proxy2"
- *   /
- * 
- * Request values:
+ *   /
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpValve
@@ -344,8 +340,9 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * proxy1
  * 
  * 
+ * 
  * Note : x-forwarded-by holds the trusted proxy 
proxy1. x-forwarded-by holds
- * 140.211.11.130 because 

[tomcat] 03/03: Align docs with 8.5.x including fixes to a copy/paste error

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 978963b70fa975122f9dafaafd1bd0905de9fb5d
Author: Mark Thomas 
AuthorDate: Tue Jul 9 16:00:03 2019 +0100

Align docs with 8.5.x including fixes to a copy/paste error
---
 webapps/docs/config/filter.xml |  4 ++--
 webapps/docs/config/valve.xml  | 22 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index 30c8c9b..6d3334f 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -923,7 +923,7 @@ FINE: Request "/docs/config/manager.html" with response 
status "200"
   
 
   
-What value should be used for the ant click-jacking header? Must be
+What value should be used for the anticlick-jacking header? Must be
 one of DENY, SAMEORIGIN,
 ALLOW-FROM  (case-insensitive). If not specified, the
 default value of DENY will be used.
@@ -1537,7 +1537,7 @@ FINE: Request "/docs/config/manager.html" with response 
status "200"
 
 Note : x-forwarded-by holds the trusted proxy 
proxy1.
 x-forwarded-by holds 140.211.11.130 because
-untrusted-proxy is not trusted and thus, we can not trust that
+untrusted-proxy is not trusted and thus, we cannot trust that
 untrusted-proxy is the actual remote ip.
 request.remoteAddr is untrusted-proxy that is an 
IP
 verified by proxy1.
diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml
index 31069d9..702a464 100644
--- a/webapps/docs/config/valve.xml
+++ b/webapps/docs/config/valve.xml
@@ -325,7 +325,7 @@
 msec - number of milliseconds since the epoch
 msec_frac - millisecond fraction
 
-These formats can not be mixed with SimpleDateFormat formats in the 
same format
+These formats cannot be mixed with SimpleDateFormat formats in the same 
format
 token.
 
 Furthermore one can define whether to log the timestamp for the request 
start
@@ -473,15 +473,15 @@
 
 
 
-
+
 
   
 
-The Remote Address Filter allows you to compare the
+The Remote Address Valve allows you to compare the
 IP address of the client that submitted this request against one or more
 regular expressions, and either allow the request to continue
 or refuse to process the request from this client.  A Remote Address
-Filter can be associated with any Catalina container
+Valve can be associated with any Catalina container
 (Engine, Host, or
 Context), and must accept any request
 presented to this container for processing before it will be passed on.
@@ -507,13 +507,13 @@
 will be 0:0:0:0:0:0:0:1 instead of the more widely used
 ::1. Consult your access logs for the actual value.
 
-See also: Remote Host Filter,
+See also: Remote Host Valve,
 Remote IP Valve.
   
 
   
 
-The Remote Address Filter supports the following
+The Remote Address Valve supports the following
 configuration attributes:
 
 
@@ -602,15 +602,15 @@
 
 
 
-
+
 
   
 
-The Remote Host Filter allows you to compare the
+The Remote Host Valve allows you to compare the
 hostname of the client that submitted this request against one or more
 regular expressions, and either allow the request to continue
 or refuse to process the request from this client.  A Remote Host
-Filter can be associated with any Catalina container
+Valve can be associated with any Catalina container
 (Engine, Host, or
 Context), and must accept any request
 presented to this container for processing before it will be passed on.
@@ -633,13 +633,13 @@
 to return proper host names, you have to enable "DNS lookups" feature on
 a Connector.
 
-See also: Remote Address Filter,
+See also: Remote Address Valve,
 HTTP Connector configuration.
   
 
   
 
-The Remote Host Filter supports the following
+The Remote Host Valve supports the following
 configuration attributes:
 
 


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



[tomcat] 01/03: Javadoc updates to align with 8.5.x

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b5beb7be415e7ea0ea03b007f5d94c42dbe80c01
Author: Mark Thomas 
AuthorDate: Tue Jul 9 15:55:22 2019 +0100

Javadoc updates to align with 8.5.x
---
 .../apache/catalina/filters/RemoteIpFilter.java| 75 +-
 1 file changed, 43 insertions(+), 32 deletions(-)

diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index d52bba9..1bc5b9f 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -67,6 +67,7 @@ import org.apache.juli.logging.LogFactory;
  * 
  * If the incoming request.getRemoteAddr() matches the servlet
  * filter's list of internal or trusted proxies:
+ * 
  * 
  * Loop on the comma delimited list of IPs and hostnames passed by the 
preceding load balancer or proxy in the given request's Http
  * header named $remoteIpHeader (default value 
x-forwarded-for). Values are processed in right-to-left order.
@@ -82,10 +83,8 @@ import org.apache.juli.logging.LogFactory;
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
  * 
- * 
- * 
- * Configuration parameters:
  * 
+ * Configuration parameters
  * 
  * XForwardedFilter property
  * Description
@@ -164,8 +163,6 @@ import org.apache.juli.logging.LogFactory;
  * 443
  * 
  * 
- * 
- * 
  * 
  * Regular expression vs. IP address blocks: 
mod_remoteip allows to use address blocks (e.g.
  * 192.168/16) to configure RemoteIPInternalProxy 
and RemoteIPTrustedProxy ; as the JVM doesn't have a
@@ -173,14 +170,14 @@ import org.apache.juli.logging.LogFactory;
  * 
href="https://apr.apache.org/docs/apr/1.3/group__apr__network__io.html#gb74d21b8898b7c40bf7fd07ad3eb993d;>apr_ipsubnet_test,
 we rely on
  * regular expressions.
  * 
- * 
+ * 
  * 
  * Sample with internal proxies
  * 
  * 
  * XForwardedFilter configuration:
  * 
- * 
+ * 
  * filter
  *filter-nameRemoteIpFilter/filter-name
  *
filter-classorg.apache.catalina.filters.RemoteIpFilter/filter-class
@@ -206,10 +203,9 @@ import org.apache.juli.logging.LogFactory;
  *filter-nameRemoteIpFilter/filter-name
  *url-pattern/*/url-pattern
  *dispatcherREQUEST/dispatcher
- * /filter-mapping
- * 
- * Request values:
+ * /filter-mapping
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpFilter
@@ -253,15 +249,14 @@ import org.apache.juli.logging.LogFactory;
  * 
  * Note : x-forwarded-by header is null because only internal 
proxies as been traversed by the request.
  * x-forwarded-by is null because all the proxies are trusted or 
internal.
- * 
- * 
+ * 
  * 
  * Sample with trusted proxies
  * 
  * 
  * RemoteIpFilter configuration:
  * 
- * 
+ * 
  * filter
  *filter-nameRemoteIpFilter/filter-name
  *
filter-classorg.apache.catalina.filters.RemoteIpFilter/filter-class
@@ -287,10 +282,9 @@ import org.apache.juli.logging.LogFactory;
  *filter-nameRemoteIpFilter/filter-name
  *url-pattern/*/url-pattern
  *dispatcherREQUEST/dispatcher
- * /filter-mapping
- * 
- * Request values:
+ * /filter-mapping
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpFilter
@@ -312,17 +306,18 @@ import org.apache.juli.logging.LogFactory;
  * proxy1, proxy2
  * 
  * 
+ * 
  * Note : proxy1 and proxy2 are both trusted proxies 
that come in x-forwarded-for header, they both
  * are migrated in x-forwarded-by header. 
x-forwarded-by is null because all the proxies are trusted or 
internal.
  * 
- * 
+ * 
  * 
  * Sample with internal and trusted proxies
  * 
  * 
  * RemoteIpFilter configuration:
  * 
- * 
+ * 
  * filter
  *filter-nameRemoteIpFilter/filter-name
  *
filter-classorg.apache.catalina.filters.RemoteIpFilter/filter-class
@@ -348,10 +343,9 @@ import org.apache.juli.logging.LogFactory;
  *filter-nameRemoteIpFilter/filter-name
  *url-pattern/*/url-pattern
  *dispatcherREQUEST/dispatcher
- * /filter-mapping
- * 
- * Request values:
+ * /filter-mapping
  * 
+ * Request Values
  * 
  * property
  * Value Before RemoteIpFilter
@@ -373,18 +367,19 @@ import org.apache.juli.logging.LogFactory;
  * proxy1, proxy2
  * 
  * 
+ * 
  * Note : proxy1 and proxy2 are both trusted proxies 
that come in x-forwarded-for header, they both
  * are migrated in x-forwarded-by header. As 
192.168.0.10 is an internal proxy, it does not appear in
  * x-forwarded-by. x-forwarded-by is null because 
all the proxies are trusted or internal.
  * 
- * 
+ * 
  * 
  * Sample with an untrusted proxy
  * 
  * 
  * RemoteIpFilter configuration:
  * 
- * 
+ * 
  * filter
  *filter-nameRemoteIpFilter/filter-name
  *
filter-classorg.apache.catalina.filters.RemoteIpFilter/filter-class
@@ -410,10 +405,9 @@ import 

[tomcat] branch 7.0.x updated (15d7f85 -> 978963b)

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 15d7f85  Back-port NPE fix
 new b5beb7b  Javadoc updates to align with 8.5.x
 new c260e6a  Align Javadoc with 8.5.x
 new 978963b  Align docs with 8.5.x including fixes to a copy/paste error

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/catalina/filters/RemoteIpFilter.java| 75 +-
 java/org/apache/catalina/valves/RemoteIpValve.java | 62 ++
 webapps/docs/config/filter.xml |  4 +-
 webapps/docs/config/valve.xml  | 22 +++
 4 files changed, 90 insertions(+), 73 deletions(-)


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



[tomcat] branch 8.5.x updated: Align with master

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new ea8ac17  Align with master
ea8ac17 is described below

commit ea8ac17257dea4538d1f10a805a422d6d4256b90
Author: Mark Thomas 
AuthorDate: Tue Jul 9 15:54:48 2019 +0100

Align with master
---
 java/org/apache/catalina/filters/RemoteIpFilter.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 20b4abd..7df9796 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -442,6 +442,7 @@ import org.apache.juli.logging.LogFactory;
  * 
  */
 public class RemoteIpFilter implements Filter {
+
 public static class XForwardedRequest extends HttpServletRequestWrapper {
 
 static final ThreadLocal threadLocalDateFormats = 
new ThreadLocal() {


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



svn commit: r34817 - /dev/tomcat/tomcat-8/v8.5.43/ /release/tomcat/tomcat-8/v8.5.43/

2019-07-09 Thread markt
Author: markt
Date: Tue Jul  9 14:33:12 2019
New Revision: 34817

Log:
Release Apache Tomcat 8.5.43

Added:
release/tomcat/tomcat-8/v8.5.43/
  - copied from r34816, dev/tomcat/tomcat-8/v8.5.43/
Removed:
dev/tomcat/tomcat-8/v8.5.43/


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



[VOTE][RESULT] Release Apache Tomcat 8.5.43

2019-07-09 Thread Mark Thomas
The following votes were cast:

Binding:
+1: markt, remm, isapir

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark

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



[tomcat] branch 8.5.x updated: Add release date for 8.5.43

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 3e8015f  Add release date for 8.5.43
3e8015f is described below

commit 3e8015f1aa5baa1f1eb0c6bf0e2ed3fec8a2b0f9
Author: Mark Thomas 
AuthorDate: Tue Jul 9 15:34:54 2019 +0100

Add release date for 8.5.43
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 437ef68..b34494f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -68,7 +68,7 @@
 
   
 
-
+
   
 
   


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



[tomcat] branch master updated: Add release date for 9.0.22

2019-07-09 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new eb9f04d  Add release date for 9.0.22
eb9f04d is described below

commit eb9f04dc0d038ef0916a43dcc5d651330219b50e
Author: Mark Thomas 
AuthorDate: Tue Jul 9 15:34:22 2019 +0100

Add release date for 9.0.22
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 93b6de2..c86f2ff 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -78,7 +78,7 @@
 
   
 
-
+
   
 
   


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



[tomcat] branch mark-forwarded-request/9.0.x updated: Process Mark's comments

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/mark-forwarded-request/9.0.x 
by this push:
 new 38139bc  Process Mark's comments
38139bc is described below

commit 38139bcfe3fdf2a1a5f511e391b3c251c692cf0c
Author: Michael Osipov 
AuthorDate: Tue Jul 9 16:43:41 2019 +0200

Process Mark's comments
---
 java/org/apache/catalina/Globals.java| 2 +-
 java/org/apache/catalina/filters/RemoteIpFilter.java | 2 +-
 java/org/apache/coyote/Constants.java| 7 ---
 webapps/docs/changelog.xml   | 3 ++-
 4 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 7ce8209..b25ee32 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -205,7 +205,7 @@ public final class Globals {
  * a request which been forwarded via one or more proxies.
  */
 public static final String REQUEST_FORWARDED_ATTRIBUTE =
-org.apache.coyote.Constants.REQUEST_FORWARDED_ATTRIBUTE;
+"org.apache.tomcat.request.forwarded";
 
 
 public static final String ASYNC_SUPPORTED_ATTR =
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index bf6431b..1afe033 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -822,7 +822,7 @@ public class RemoteIpFilter extends GenericFilter {
 }
 }
 
-request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
 
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index 6b264e3..1475ba7 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -96,11 +96,4 @@ public final class Constants {
  * the X-Forwarded-For HTTP header.
  */
 public static final String REMOTE_ADDR_ATTRIBUTE = 
"org.apache.tomcat.remoteAddr";
-
-/**
- * The request attribute that is set to the value of {@code Boolean.TRUE}
- * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
- * a request which been forwarded via one or more proxies.
- */
-public static final String REQUEST_FORWARDED_ATTRIBUTE = 
"org.apache.tomcat.request.forwarded";
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d95f6c1..2e7a08b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -48,7 +48,8 @@
   
 
   
-63556: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter (michaelo)
+63556: Mark request as forwarded in RemoteIpValve and
+RemoteIpFilter (michaelo)
   
  
   


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



[GitHub] [tomcat] michael-o commented on issue #178: Bug 63556 - Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread GitBox
michael-o commented on issue #178: Bug 63556 - Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter
URL: https://github.com/apache/tomcat/pull/178#issuecomment-509672500
 
 
   @markt-asf Done. Will now run the tests again.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[tomcat] 01/01: BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f022cca6f593f9e8e64c4b827e65da41eecc66fe
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  |  9 +++
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  8 ++
 6 files changed, 78 insertions(+)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 8801724..b25ee32 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -199,6 +199,15 @@ public final class Globals {
 org.apache.coyote.Constants.REMOTE_ADDR_ATTRIBUTE;
 
 
+/**
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
+ */
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+"org.apache.tomcat.request.forwarded";
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 7df9796..5053f76 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -85,6 +85,8 @@ import org.apache.juli.logging.LogFactory;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -861,6 +863,8 @@ public class RemoteIpFilter implements Filter {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 145b095..cd08cc7 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -651,6 +653,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/test/org/apache/catalina/filters/TestRemoteIpFilter.java 
b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
index acfc881..3fb6580 100644
--- a/test/org/apache/catalina/filters/TestRemoteIpFilter.java
+++ b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
@@ -42,6 +42,7 @@ import org.junit.Test;
 
 import org.apache.catalina.AccessLog;
 import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.connector.Request;
@@ -625,6 +626,28 @@ public class TestRemoteIpFilter extends TomcatBaseTest {
 actualRequest.getAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE));
 }
 
+

[tomcat] branch mark-forwarded-request/8.5.x updated (e0d237e -> f022cca)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


 discard e0d237e  Process Mark's comments
 discard b26dab2  Add bug id
 discard 644af22  Better attribute name
 discard 2eeb813  Mark request as forwarded in RemoteIpValve/RemoteIpFilter
 add 051f354  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=55969
 add 83911c2  Clean-up. Spacing,unnecessary code, etc. No functional change
 add 3e8015f  Add release date for 8.5.43
 add c57e930  Fix typo
 add ea8ac17  Align with master
 new f022cca  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e0d237e)
\
 N -- N -- N   refs/heads/mark-forwarded-request/8.5.x (f022cca)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.properties.default   |  14 +--
 java/org/apache/catalina/connector/Request.java| 134 +++--
 .../apache/catalina/filters/RemoteIpFilter.java|   1 +
 res/tomcat.nsi |  18 ++-
 webapps/docs/changelog.xml |  17 ++-
 5 files changed, 84 insertions(+), 100 deletions(-)


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



[tomcat] branch 7.0.x updated: Fix typo

2019-07-09 Thread violetagg
This is an automated email from the ASF dual-hosted git repository.

violetagg pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 09baa65  Fix typo
09baa65 is described below

commit 09baa6527a6021c7c7b3a40d2464d91b450e3bf7
Author: Violeta Georgieva 
AuthorDate: Tue Jul 9 20:28:30 2019 +0300

Fix typo

Fixes having an issue number are sorted by their number, ascending.
---
 webapps/docs/changelog.xml | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b2d9092..e002955 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -152,7 +152,7 @@
   
   
 Fix to avoid the possibility of long poll times for individual pollers
-when using mutliple pollers with APR. (markt)
+when using multiple pollers with APR. (markt)
   
   
 Refactor the fix for 63205 so it only applies when using
@@ -211,6 +211,14 @@
   
   
 
+  
+55969: Tighten up the security of the Apache Tomcat
+installation created by the Windows installer. Change the default
+shutdown port used by the Windows installer from 8005 to
+-1 (disabled). Limit access to the chosen installation
+directory to local administrators, Local System and Local Service.
+(markt)
+  
   
 59871: Add a property (timeFormat) to
 JULIs OneLineFormatter to enable the format of the
@@ -245,14 +253,6 @@
 Windows installer for the Windows service from Local 
System
 to the lower privileged Local Service. (markt)
   
-  
-55969: Tighten up the security of the Apache Tomcat
-installation created by the Windows installer. Change the default
-shutdown port used by the Windows installer from 8005 to
--1 (disabled). Limit access to the chosen installation
-directory to local administrators, Local System and Local Service.
-(markt)
-  
 
   
 


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



[Bug 63389] Enable Servlet Warmup for Containerization

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63389

--- Comment #10 from Eugène Adell  ---
(In reply to Igal Sapir from comment #0)
> Currently, one hack that many use is to launch Tomcat during the container
> build process, wait for an arbitrary length of time, e.g. 10s or 20s, and
> then shut Tomcat down.

>From your question and some comments, if the problem is with the "arbitrary
length of time", I suggest to rely on JMX particularly on the Connector
stateName value. It is changing from INITIALIZED to STARTED once Tomcat has
finished deploying. If you can bring ANT within your docker, the effort is not
that huge, you just need 2 targets, one for monitoring the Connector state, and
one for stopping Tomcat.

This is the result that I get with a servlet called at the startup and that
sleeps 60 during its initialization :

catalina.out
09-Jul-2019 22:10:55.804 INFO [localhost-startStop-5]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory
[/home/eadell/tests/apache-tomcat-8.5.15/webapps/host-manager] has finished in
[27] ms
09-Jul-2019 22:10:55.879 FINE [localhost-startStop-4]
org.apache.catalina.authenticator.AuthenticatorBase.startInternal No
SingleSignOn Valve is present
09-Jul-2019 22:10:56.055 INFO [localhost-startStop-4]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory
[/home/eadell/tests/apache-tomcat-8.5.15/webapps/examples] has finished in
[793] ms
09-Jul-2019 22:11:55.779 INFO [localhost-startStop-3]
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web
application directory
[/home/eadell/tests/apache-tomcat-8.5.15/webapps/slowstart] has finished in
[60,518] ms
09-Jul-2019 22:11:55.790 INFO [main] org.apache.coyote.AbstractProtocol.start
Starting ProtocolHandler ["http-nio-8280"]
09-Jul-2019 22:11:55.811 INFO [main] org.apache.coyote.AbstractProtocol.start
Starting ProtocolHandler ["http-nio-8281"]
09-Jul-2019 22:11:55.815 INFO [main] org.apache.catalina.startup.Catalina.start
Server startup in 60719 ms
09-Jul-2019 22:11:57.411 INFO [main]
org.apache.catalina.core.StandardServer.await A valid shutdown command was
received via the shutdown port. Stopping the Server instance.
09-Jul-2019 22:11:57.412 INFO [main] org.apache.coyote.AbstractProtocol.pause
Pausing ProtocolHandler ["http-nio-8280"]
09-Jul-2019 22:11:57.469 INFO [main] org.apache.coyote.AbstractProtocol.pause
Pausing ProtocolHandler ["http-nio-8281"]
09-Jul-2019 22:11:57.521 INFO [main]
org.apache.catalina.core.StandardService.stopInternal Stopping service
[Catalina]
destroying LongInitServlet

shell output
$ time (bin/startup.sh ; ant -f anted-jmx/project.xml buildAndStop)
Using CATALINA_BASE:   /home/eadell/tests/apache-tomcat
Using CATALINA_HOME:   /home/eadell/tests/apache-tomcat
Using CATALINA_TMPDIR: /home/eadell/tests/apache-tomcat/temp
Using JRE_HOME:/usr/local/java/1.9
Using CLASSPATH:  
/home/eadell/tests/apache-tomcat/bin/bootstrap.jar:/home/eadell/tests/apache-tomcat/bin/tomcat-juli.jar
Tomcat started.
Buildfile: /home/eadell/tests/apache-tomcat-8.5.15/anted-jmx/project.xml

waitMBEAN:
 [echo] Server url alive

shutdown:
 [echo] shutting down ${tomcat.catalina_base}

buildAndStop:

BUILD SUCCESSFUL
Total time: 1 minute 3 seconds

real1m4.673s
user0m5.157s
sys 0m0.600s


Here are the ANT targets :


  
  
  
  
  
  











If required you could also add targets to call servlets, and stop once you have
finished these calls.

Of course, remember to use a random JMX password then you would not compromise
all of your Tomcats if something bad happened.

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



[tomcat] 01/01: BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 633950059c04f869d645553540b8ffe825891608
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  |  8 +-
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  5 
 6 files changed, 73 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 90ab78c..d079697 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -274,8 +274,14 @@ public final class Globals {
 
 
 /**
- *
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
  */
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+"org.apache.tomcat.request.forwarded";
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 1bc5b9f..2830ac7 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -82,6 +82,8 @@ import org.apache.juli.logging.LogFactory;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -842,6 +844,8 @@ public class RemoteIpFilter implements Filter {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 24e0065..f36cd72 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -660,6 +662,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/test/org/apache/catalina/filters/TestRemoteIpFilter.java 
b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
index 3d796bd..f6c14eb 100644
--- a/test/org/apache/catalina/filters/TestRemoteIpFilter.java
+++ b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
@@ -42,6 +42,7 @@ import org.junit.Test;
 
 import org.apache.catalina.AccessLog;
 import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.connector.Request;
@@ -625,6 +626,28 @@ public class TestRemoteIpFilter extends TomcatBaseTest {
 actualRequest.getAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE));
 }
 
+@Test
+public void testRequestForwarded() 

[tomcat] branch mark-forwarded-request/7.0.x updated (f33fcbb -> 6339500)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


 discard f33fcbb  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter
 new 6339500  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f33fcbb)
\
 N -- N -- N   refs/heads/mark-forwarded-request/7.0.x (6339500)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 webapps/docs/changelog.xml | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)


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



[tomcat] branch master updated: JSP compatibility testing for Graal

2019-07-09 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 5474fd4  JSP compatibility testing for Graal
5474fd4 is described below

commit 5474fd4faa5f7fe4bebf466d41d2e591de062311
Author: remm 
AuthorDate: Tue Jul 9 18:44:10 2019 +0200

JSP compatibility testing for Graal

The JSP runtime library needed "equivalent" simpler reflection code to
work with Graal as java.beans.Introspector.getBeanInfo doesn't work for
me. This will likely lead to some limitations for JSPs.
Also add an Ant script to precompile JSPs and package them. The script
uses a dependency on target/tomcat-maven-1.0.jar which is cyclic, for
convenience (mvn package, precompile, mvn clean, mvn package again).
---
 .../apache/jasper/runtime/JspRuntimeLibrary.java   | 133 +++--
 res/tomcat-maven/graal-webapp.ant.xml  |  49 
 2 files changed, 143 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/jasper/runtime/JspRuntimeLibrary.java 
b/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
index a44c046..cc8416b 100644
--- a/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
+++ b/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
@@ -56,6 +56,22 @@ import org.apache.tomcat.InstanceManager;
  */
 public class JspRuntimeLibrary {
 
+private static final boolean GRAAL;
+
+static {
+boolean result = false;
+try {
+Class nativeImageClazz = 
Class.forName("org.graalvm.nativeimage.ImageInfo");
+result = nativeImageClazz.getMethod("inImageCode").invoke(null) != 
null;
+// Note: This will also be true for the Graal substrate VM
+} catch (ClassNotFoundException e) {
+// Must be Graal
+} catch (ReflectiveOperationException | IllegalArgumentException e) {
+// Should never happen
+}
+GRAAL = result;
+}
+
 /**
  * Returns the value of the javax.servlet.error.exception request
  * attribute value, if present, otherwise the value of the
@@ -291,17 +307,24 @@ public class JspRuntimeLibrary {
 Class type = null;
 Class propertyEditorClass = null;
 try {
-java.beans.BeanInfo info
+if (GRAAL) {
+method = getWriteMethod(bean.getClass(), prop);
+if (method.getParameterTypes().length > 0) {
+type = method.getParameterTypes()[0];
+}
+} else {
+java.beans.BeanInfo info
 = java.beans.Introspector.getBeanInfo(bean.getClass());
-if ( info != null ) {
-java.beans.PropertyDescriptor pd[]
-= info.getPropertyDescriptors();
-for (int i = 0 ; i < pd.length ; i++) {
-if ( pd[i].getName().equals(prop) ) {
-method = pd[i].getWriteMethod();
-type   = pd[i].getPropertyType();
-propertyEditorClass = pd[i].getPropertyEditorClass();
-break;
+if ( info != null ) {
+java.beans.PropertyDescriptor pd[]
+= info.getPropertyDescriptors();
+for (int i = 0 ; i < pd.length ; i++) {
+if ( pd[i].getName().equals(prop) ) {
+method = pd[i].getWriteMethod();
+type   = pd[i].getPropertyType();
+propertyEditorClass = 
pd[i].getPropertyEditorClass();
+break;
+}
 }
 }
 }
@@ -709,24 +732,48 @@ public class JspRuntimeLibrary {
 }
 }
 
+/**
+ * Reverse of Introspector.decapitalize.
+ * @param name The name
+ * @return the capitalized string
+ */
+public static String capitalize(String name) {
+if (name == null || name.length() == 0) {
+return name;
+}
+char chars[] = name.toCharArray();
+chars[0] = Character.toUpperCase(chars[0]);
+return new String(chars);
+}
+
 public static Method getWriteMethod(Class beanClass, String prop)
-throws JasperException {
-Method method = null;
+throws JasperException {
+Method result = null;
 Class type = null;
-try {
-java.beans.BeanInfo info = 
java.beans.Introspector.getBeanInfo(beanClass);
-java.beans.PropertyDescriptor pd[] = info.getPropertyDescriptors();
-for (int i = 0 ; i < pd.length ; i++) {
-if ( pd[i].getName().equals(prop) ) {
-method = pd[i].getWriteMethod();
-type = pd[i].getPropertyType();
-  

Re: Git repo for Tomcat Site

2019-07-09 Thread Igal Sapir

Mark,

On 7/9/2019 1:45 AM, Mark Thomas wrote:

On 09/07/2019 05:29, Igal Sapir wrote:

Can we move the Tomcat site to Git?

Yes. ASF infra supports both svnpubsub and gitpubsub for websites. There
will need to be a little co-ordination with infra as we'd need to switch
where the source for the site is pulled from.

On the plus side, Tomcat site svn repo is not mirrored to git so we
don't need to worry about any of that.

I'll look into to the migration process and figure out exactly what is
involved.


ACK




Possibly to a repo named "tomcat-site"?

That makes sense.

In terms of when, I'd suggest after the 9.0.x and 8.5.x releases have
completed. There is usually a quietish period of ~3 weeks between
releases when the website doesn't update that much. I think it makes
sense to migrate then.

All of this is assuming there are no objections to moving. If there are
any objections please speak up now so we can discuss any concerns and
figure out a way forward everyone is happy with.


I'd be happy to make the required changes per prior emails so that we
can publish the new design in time for ACNA.

Migration to Git and a new design are two separate issues. I'd be happy
to see both proceed but I suggest we discuss them separately. I suggest
you start a new thread for the discussion about moving to a new design -
perhaps with a link to a demo of the latest proposal so we can remind
ourselves of what it looks like.


True, but it is much easier for me to use Git so personally for me the 
two issues are not completely unrelated.


As of the last communications on the matter the current proposal can be 
viewed at http://people.apache.org/~isapir/mockups/tomcat-site/ and the 
open issues are on the DEV mailing list, mostly in the thread 
https://www.mail-archive.com/dev@tomcat.apache.org/msg131745.html


The last discussion on the subject was at 
https://www.mail-archive.com/dev@tomcat.apache.org/msg132281.html


Best,

Igal



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



[Bug 63556] Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63556

Michael Osipov  changed:

   What|Removed |Added

Summary|Mark request as forwarded   |Mark request as forwarded
   |in  |in RemoteIpValve and
   |RemoteIpValve/RemoteIpFilte |RemoteIpFilter
   |r   |

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



[tomcat] branch mark-forwarded-request/7.0.x created (now f33fcbb)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


  at f33fcbb  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

This branch includes the following new commits:

 new f33fcbb  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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



[tomcat] 01/01: BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f33fcbbd8bbcb8cde635c01615a1daeb802c677d
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  |  8 +-
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml | 11 
 6 files changed, 79 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 90ab78c..d079697 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -274,8 +274,14 @@ public final class Globals {
 
 
 /**
- *
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
  */
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+"org.apache.tomcat.request.forwarded";
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 1bc5b9f..2830ac7 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -82,6 +82,8 @@ import org.apache.juli.logging.LogFactory;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -842,6 +844,8 @@ public class RemoteIpFilter implements Filter {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 24e0065..f36cd72 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -660,6 +662,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/test/org/apache/catalina/filters/TestRemoteIpFilter.java 
b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
index 3d796bd..f6c14eb 100644
--- a/test/org/apache/catalina/filters/TestRemoteIpFilter.java
+++ b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
@@ -42,6 +42,7 @@ import org.junit.Test;
 
 import org.apache.catalina.AccessLog;
 import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.connector.Request;
@@ -625,6 +626,28 @@ public class TestRemoteIpFilter extends TomcatBaseTest {
 actualRequest.getAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE));
 }
 
+@Test
+public void 

[tomcat] branch mark-forwarded-request/9.0.x deleted (was 6c891b6)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


 was 6c891b6  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


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



[Bug 63556] Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63556

Michael Osipov  changed:

   What|Removed |Added

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

--- Comment #2 from Michael Osipov  ---
Fixed in:
- master for 9.0.23 onwards
- 8.5.x for 8.5.44 onwards
- 7.0.x for 7.0.95 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



[tomcat] branch mark-forwarded-request/8.5.x deleted (was f022cca)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


 was f022cca  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


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



[Bug 62496] Add possibility write remote user/auth type to response header

2019-07-09 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62496
Bug 62496 depends on bug 63556, which changed state.

Bug 63556 Summary: Mark request as forwarded in RemoteIpValve and RemoteIpFilter
https://bz.apache.org/bugzilla/show_bug.cgi?id=63556

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |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



[tomcat] branch mark-forwarded-request/7.0.x deleted (was 6339500)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


 was 6339500  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


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



[tomcat] 01/01: BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit db6e8222c7717c4443fcdebe479e9417c5deaa46
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  |  9 +++
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  8 ++
 6 files changed, 78 insertions(+)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 8801724..b25ee32 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -199,6 +199,15 @@ public final class Globals {
 org.apache.coyote.Constants.REMOTE_ADDR_ATTRIBUTE;
 
 
+/**
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
+ */
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+"org.apache.tomcat.request.forwarded";
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 5c04858..1afe033 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -82,6 +82,8 @@ import org.apache.tomcat.util.res.StringManager;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -820,6 +822,8 @@ public class RemoteIpFilter extends GenericFilter {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 145b095..cd08cc7 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -651,6 +653,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/test/org/apache/catalina/filters/TestRemoteIpFilter.java 
b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
index f7f2093..956bbf1 100644
--- a/test/org/apache/catalina/filters/TestRemoteIpFilter.java
+++ b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
@@ -42,6 +42,7 @@ import org.junit.Test;
 
 import org.apache.catalina.AccessLog;
 import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.connector.Request;
@@ -624,6 +625,28 @@ public class TestRemoteIpFilter extends TomcatBaseTest {
 actualRequest.getAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE));
 }

[tomcat] branch mark-forwarded-request/9.0.x updated (38139bc -> db6e822)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


omit 38139bc  Process Mark's comments
omit 5ac2847  Add bug id
omit 7993b8b  Better attribute name
omit c5b816d  Mark request as forwarded in RemoteIpValve/RemoteIpFilter
 new db6e822  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (38139bc)
\
 N -- N -- N   refs/heads/mark-forwarded-request/9.0.x (db6e822)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


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



[tomcat] branch mark-forwarded-request/8.5.x updated: Process Mark's comments

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/mark-forwarded-request/8.5.x 
by this push:
 new e0d237e  Process Mark's comments
e0d237e is described below

commit e0d237e56b32ee5089305337fa41d1a1fc1aeac5
Author: Michael Osipov 
AuthorDate: Tue Jul 9 16:43:41 2019 +0200

Process Mark's comments
---
 java/org/apache/catalina/Globals.java| 2 +-
 java/org/apache/catalina/filters/RemoteIpFilter.java | 2 +-
 java/org/apache/coyote/Constants.java| 7 ---
 webapps/docs/changelog.xml   | 3 ++-
 4 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 7ce8209..b25ee32 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -205,7 +205,7 @@ public final class Globals {
  * a request which been forwarded via one or more proxies.
  */
 public static final String REQUEST_FORWARDED_ATTRIBUTE =
-org.apache.coyote.Constants.REQUEST_FORWARDED_ATTRIBUTE;
+"org.apache.tomcat.request.forwarded";
 
 
 public static final String ASYNC_SUPPORTED_ATTR =
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 423b561..c3f5a81 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -862,7 +862,7 @@ public class RemoteIpFilter implements Filter {
 }
 }
 
-request.setAttribute(Globals.FORWARDED_REQUEST_ATTRIBUTE, 
Boolean.TRUE);
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
 
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
diff --git a/java/org/apache/coyote/Constants.java 
b/java/org/apache/coyote/Constants.java
index 898068a..9de194d 100644
--- a/java/org/apache/coyote/Constants.java
+++ b/java/org/apache/coyote/Constants.java
@@ -111,11 +111,4 @@ public final class Constants {
  * the X-Forwarded-For HTTP header.
  */
 public static final String REMOTE_ADDR_ATTRIBUTE = 
"org.apache.tomcat.remoteAddr";
-
-/**
- * The request attribute that is set to the value of {@code Boolean.TRUE}
- * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
- * a request which been forwarded via one or more proxies.
- */
-public static final String REQUEST_FORWARDED_ATTRIBUTE = 
"org.apache.tomcat.request.forwarded";
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 959544a..96e89f4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -48,7 +48,8 @@
   
 
   
-63556: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter (michaelo)
+63556: Mark request as forwarded in RemoteIpValve and
+RemoteIpFilter (michaelo)
   
  
   


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



[tomcat] 01/01: BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6c891b6cec5695cd9afb49ce9d0baa37f6cad1f1
Author: Michael Osipov 
AuthorDate: Tue Jul 9 14:59:09 2019 +0200

BZ 63556: Mark request as forwarded in RemoteIpValve and RemoteIpFilter
---
 java/org/apache/catalina/Globals.java  |  9 +++
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  8 ++
 6 files changed, 78 insertions(+)

diff --git a/java/org/apache/catalina/Globals.java 
b/java/org/apache/catalina/Globals.java
index 8801724..b25ee32 100644
--- a/java/org/apache/catalina/Globals.java
+++ b/java/org/apache/catalina/Globals.java
@@ -199,6 +199,15 @@ public final class Globals {
 org.apache.coyote.Constants.REMOTE_ADDR_ATTRIBUTE;
 
 
+/**
+ * The request attribute that is set to the value of {@code Boolean.TRUE}
+ * by the RemoteIpFilter, RemoteIpValve (and other similar components) 
that identifies
+ * a request which been forwarded via one or more proxies.
+ */
+public static final String REQUEST_FORWARDED_ATTRIBUTE =
+"org.apache.tomcat.request.forwarded";
+
+
 public static final String ASYNC_SUPPORTED_ATTR =
 "org.apache.catalina.ASYNC_SUPPORTED";
 
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java 
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 5c04858..1afe033 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -82,6 +82,8 @@ import org.apache.tomcat.util.res.StringManager;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -820,6 +822,8 @@ public class RemoteIpFilter extends GenericFilter {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + request.getRemoteAddr()
 + "', originalRemoteHost='" + request.getRemoteHost() 
+ "', originalSecure='" + request.isSecure()
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 145b095..cd08cc7 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -64,6 +64,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * protocolHeaderHttpsValue configuration parameter (default 
https) then request.isSecure = true,
  * request.scheme = https and request.serverPort = 
443. Note that 443 can be overwritten with the
  * $httpsServerPort configuration parameter.
+ * Mark the request with the attribute {@link 
Globals#REQUEST_FORWARDED_ATTRIBUTE} and value {@code Boolean.TRUE} to indicate
+ * that this request has been forwarded by one or more proxies.
  * 
  * 
  * Configuration parameters
@@ -651,6 +653,8 @@ public class RemoteIpValve extends ValveBase {
 }
 }
 
+request.setAttribute(Globals.REQUEST_FORWARDED_ATTRIBUTE, 
Boolean.TRUE);
+
 if (log.isDebugEnabled()) {
 log.debug("Incoming request " + request.getRequestURI() + " 
with originalRemoteAddr '" + originalRemoteAddr
   + "', originalRemoteHost='" + originalRemoteHost + 
"', originalSecure='" + originalSecure + "', originalScheme='"
diff --git a/test/org/apache/catalina/filters/TestRemoteIpFilter.java 
b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
index f7f2093..956bbf1 100644
--- a/test/org/apache/catalina/filters/TestRemoteIpFilter.java
+++ b/test/org/apache/catalina/filters/TestRemoteIpFilter.java
@@ -42,6 +42,7 @@ import org.junit.Test;
 
 import org.apache.catalina.AccessLog;
 import org.apache.catalina.Context;
+import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.connector.Request;
@@ -624,6 +625,28 @@ public class TestRemoteIpFilter extends TomcatBaseTest {
 actualRequest.getAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE));
 }

Re: [tomcat] branch mark-forwarded-request/8.5.x created (now 644af22)

2019-07-09 Thread Rémy Maucherat
On Tue, Jul 9, 2019 at 3:55 PM  wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> michaelo pushed a change to branch mark-forwarded-request/8.5.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git.
>
>
>   at 644af22  Better attribute name
>
> This branch includes the following new commits:
>
>  new 2eeb813  Mark request as forwarded in RemoteIpValve/RemoteIpFilter
>  new 644af22  Better attribute name
>
> The 2 revisions listed above as "new" are entirely new to this
> repository and will be described in separate emails.  The revisions
> listed as "add" were already present in the repository and have only
> been added to this reference.
>

Personally, I don't like the idea of using random branches in the main
repository vs using forks.

Should it be explicitly required to use forks with PRs for reviews ?

Rémy


[tomcat] branch mark-forwarded-request/9.0.x updated (db6e822 -> 6c891b6)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch mark-forwarded-request/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


 discard db6e822  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter
 add e110331  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=55969
 add c9947ff  Code clean-up. Space, indents, {}, wrapping. No functional 
change.
 add eb9f04d  Add release date for 9.0.22
 add 1ccb893  Fix typo
 add 5474fd4  JSP compatibility testing for Graal
 new 6c891b6  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (db6e822)
\
 N -- N -- N   refs/heads/mark-forwarded-request/9.0.x (6c891b6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.properties.default   |  14 +--
 java/org/apache/catalina/connector/Request.java|  89 ++
 .../apache/jasper/runtime/JspRuntimeLibrary.java   | 133 +++--
 res/tomcat-maven/graal-webapp.ant.xml  |  49 
 res/tomcat.nsi |  18 ++-
 webapps/docs/changelog.xml |  17 ++-
 6 files changed, 216 insertions(+), 104 deletions(-)
 create mode 100644 res/tomcat-maven/graal-webapp.ant.xml


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



Re: [tomcat] branch mark-forwarded-request/8.5.x created (now 644af22)

2019-07-09 Thread Mark Thomas
On 09/07/2019 21:09, Rémy Maucherat wrote:
> On Tue, Jul 9, 2019 at 3:55 PM  > wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> michaelo pushed a change to branch mark-forwarded-request/8.5.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git.
> 
> 
>       at 644af22  Better attribute name
> 
> This branch includes the following new commits:
> 
>      new 2eeb813  Mark request as forwarded in
> RemoteIpValve/RemoteIpFilter
>      new 644af22  Better attribute name
> 
> The 2 revisions listed above as "new" are entirely new to this
> repository and will be described in separate emails.  The revisions
> listed as "add" were already present in the repository and have only
> been added to this reference.
> 
> 
> Personally, I don't like the idea of using random branches in the main
> repository vs using forks.
> 
> Should it be explicitly required to use forks with PRs for reviews ?

I'm undecided.

I will note that we can delete these additional branches once they are
no longer required.

Mark

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



[tomcat] branch 7.0.x updated (09baa65 -> 6339500)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 09baa65  Fix typo
 add 6339500  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/Globals.java  |  8 +-
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  5 
 6 files changed, 73 insertions(+), 1 deletion(-)


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



[GitHub] [tomcat] asfgit merged pull request #178: BZ 63556: Mark request as forwarded in RemoteIpValve/RemoteIpFilter

2019-07-09 Thread GitBox
asfgit merged pull request #178: BZ 63556: Mark request as forwarded in 
RemoteIpValve/RemoteIpFilter
URL: https://github.com/apache/tomcat/pull/178
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[tomcat] branch 8.5.x updated (ea8ac17 -> f022cca)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from ea8ac17  Align with master
 add f022cca  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/Globals.java  |  9 +++
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  8 ++
 6 files changed, 78 insertions(+)


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



[tomcat] branch master updated (5474fd4 -> 6c891b6)

2019-07-09 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 5474fd4  JSP compatibility testing for Graal
 add 6c891b6  BZ 63556: Mark request as forwarded in RemoteIpValve and 
RemoteIpFilter

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/Globals.java  |  9 +++
 .../apache/catalina/filters/RemoteIpFilter.java|  4 +++
 java/org/apache/catalina/valves/RemoteIpValve.java |  4 +++
 .../catalina/filters/TestRemoteIpFilter.java   | 23 +
 .../apache/catalina/valves/TestRemoteIpValve.java  | 30 ++
 webapps/docs/changelog.xml |  8 ++
 6 files changed, 78 insertions(+)


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



Tag Tomcat 7

2019-07-09 Thread Violeta Georgieva
Hi,

I'm planning to tag Tomcat 7 later today.
If you want to include something please reply here.

Regards,
Violeta


[tomcat] branch master updated: Fix some missed i18n

2019-07-09 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 19c5d56  Fix some missed i18n
19c5d56 is described below

commit 19c5d56066b21625b1595c0fa702680cd3bd4f6e
Author: remm 
AuthorDate: Wed Jul 10 01:20:47 2019 +0200

Fix some missed i18n
---
 java/org/apache/naming/factory/FactoryBase.java| 12 +++-
 java/org/apache/naming/factory/LocalStrings.properties |  4 
 java/org/apache/naming/factory/ResourceFactory.java|  2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/naming/factory/FactoryBase.java 
b/java/org/apache/naming/factory/FactoryBase.java
index ee5510e..a49c4b1 100644
--- a/java/org/apache/naming/factory/FactoryBase.java
+++ b/java/org/apache/naming/factory/FactoryBase.java
@@ -25,12 +25,16 @@ import javax.naming.RefAddr;
 import javax.naming.Reference;
 import javax.naming.spi.ObjectFactory;
 
+import org.apache.naming.StringManager;
+
 /**
  * Abstract base class that provides common functionality required by
  * sub-classes. This class exists primarily to reduce code duplication.
  */
 public abstract class FactoryBase implements ObjectFactory {
 
+private static final StringManager sm = 
StringManager.getManager(FactoryBase.class);
+
 /**
  * Creates a new object instance.
  *
@@ -63,8 +67,7 @@ public abstract class FactoryBase implements ObjectFactory {
 factoryClass = Class.forName(factoryClassName);
 }
 } catch(ClassNotFoundException e) {
-NamingException ex = new NamingException(
-"Could not load resource factory class");
+NamingException ex = new 
NamingException(sm.getString("factoryBase.factoryClassError"));
 ex.initCause(e);
 throw ex;
 }
@@ -80,8 +83,7 @@ public abstract class FactoryBase implements ObjectFactory {
 if (t instanceof VirtualMachineError) {
 throw (VirtualMachineError) t;
 }
-NamingException ex = new NamingException(
-"Could not create resource factory instance");
+NamingException ex = new 
NamingException(sm.getString("factoryBase.factoryCreationError"));
 ex.initCause(t);
 throw ex;
 }
@@ -93,7 +95,7 @@ public abstract class FactoryBase implements ObjectFactory {
 if (factory != null) {
 return factory.getObjectInstance(obj, name, nameCtx, 
environment);
 } else {
-throw new NamingException("Cannot create resource instance");
+throw new 
NamingException(sm.getString("factoryBase.instanceCreationError"));
 }
 }
 
diff --git a/java/org/apache/naming/factory/LocalStrings.properties 
b/java/org/apache/naming/factory/LocalStrings.properties
index df6376b..692cef2 100644
--- a/java/org/apache/naming/factory/LocalStrings.properties
+++ b/java/org/apache/naming/factory/LocalStrings.properties
@@ -15,6 +15,10 @@
 
 dataSourceLinkFactory.badWrapper=Not a wrapper for type [{0}]
 
+factoryBase.factoryClassError=Could not load resource factory class
+factoryBase.factoryCreationError=Could not create resource factory instance
+factoryBase.instanceCreationError=Could not create resource instance
+
 lookupFactory.circularReference=Found a circular reference involving [{0}]
 lookupFactory.createFailed=Could not create instance of JNDI lookup factory 
class
 lookupFactory.loadFailed=Could not load JNDI lookup factory class
diff --git a/java/org/apache/naming/factory/ResourceFactory.java 
b/java/org/apache/naming/factory/ResourceFactory.java
index 44ca509..a458315 100644
--- a/java/org/apache/naming/factory/ResourceFactory.java
+++ b/java/org/apache/naming/factory/ResourceFactory.java
@@ -30,7 +30,7 @@ import org.apache.naming.StringManager;
  */
 public class ResourceFactory extends FactoryBase {
 
-private static final StringManager sm = 
StringManager.getManager(ResourceLinkFactory.class);
+private static final StringManager sm = 
StringManager.getManager(ResourceFactory.class);
 
 @Override
 protected boolean isReferenceTypeSupported(Object obj) {


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