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 55d96d0 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63196
55d96d0 is described below
commit 55d96d07786f98604c80d1babf509165af306016
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Mar 13 19:14:12 2019 +0000
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63196
Provide a default (X-Forwarded-Proto) for the protocolHeader attribute
of the RemoteIpFilter and RemoteIpValve.
---
java/org/apache/catalina/filters/RemoteIpFilter.java | 2 +-
java/org/apache/catalina/valves/RemoteIpValve.java | 2 +-
webapps/docs/changelog.xml | 5 +++++
webapps/docs/config/filter.xml | 2 +-
webapps/docs/config/valve.xml | 2 +-
5 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index 38ede0f..5c04858 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -710,7 +710,7 @@ public class RemoteIpFilter extends GenericFilter {
/**
* @see #setProtocolHeader(String)
*/
- private String protocolHeader = null;
+ private String protocolHeader = "X-Forwarded-Proto";
private String protocolHeaderHttpsValue = "https";
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java
b/java/org/apache/catalina/valves/RemoteIpValve.java
index f82af32..145b095 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -420,7 +420,7 @@ public class RemoteIpValve extends ValveBase {
/**
* @see #setProtocolHeader(String)
*/
- private String protocolHeader = null;
+ private String protocolHeader = "X-Forwarded-Proto";
/**
* @see #setProtocolHeaderHttpsValue(String)
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1a7e428..fdc1770 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -48,6 +48,11 @@
<subsection name="Catalina">
<changelog>
<fix>
+ <bug>63196</bug>: Provide a default (<code>X-Forwarded-Proto</code>)
for
+ the <code>protocolHeader</code> attribute of the
+ <code>RemoteIpFilter</code> and <code>RemoteIpValve</code>. (markt)
+ </fix>
+ <fix>
<bug>63249</bug>: Use a consistent log level (<code>WARN</code>) when
logging the failure to register or deregister a JMX Bean. (markt)
</fix>
diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index d486735..9e5b5fb 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -1594,7 +1594,7 @@ FINE: Request "/docs/config/manager.html" with response
status "200"
<attribute name="protocolHeader" required="false">
<p>Name of the HTTP Header read by this valve that holds the protocol
used by the client to connect to the proxy. If not specified, the
- default of <code>null</code> is used.</p>
+ default of <code>X-Forwarded-Proto</code> is used.</p>
</attribute>
<attribute name="portHeader" required="false">
diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml
index 9868893..a96aa96 100644
--- a/webapps/docs/config/valve.xml
+++ b/webapps/docs/config/valve.xml
@@ -995,7 +995,7 @@
<attribute name="protocolHeader" required="false">
<p>Name of the HTTP Header read by this valve that holds the protocol
used by the client to connect to the proxy. If not specified, the
- default of <code>null</code> is used.</p>
+ default of <code>X-Forwarded-Proto</code> is used.</p>
</attribute>
<attribute name="portHeader" required="false">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]