This is an automated email from the ASF dual-hosted git repository.
lihan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 24a10f2900 BZ 66359 - Update javadoc for RemoteIpFilter and
RemoteIpValve
24a10f2900 is described below
commit 24a10f29001b753d4ab879c42c964eaa955bcfbd
Author: lihan <[email protected]>
AuthorDate: Tue Nov 22 11:14:48 2022 +0800
BZ 66359 - Update javadoc for RemoteIpFilter and RemoteIpValve
https://bz.apache.org/bugzilla/show_bug.cgi?id=66359
---
java/org/apache/catalina/filters/RemoteIpFilter.java | 6 +++---
java/org/apache/catalina/valves/RemoteIpValve.java | 6 +++---
webapps/docs/changelog.xml | 5 +++++
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index c485ea3fdc..28c692202d 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -83,7 +83,7 @@ import org.apache.tomcat.util.res.StringManager;
* <li>otherwise, the ip/host is declared to be the remote ip and looping is
stopped.</li>
* </ul>
* </li>
- * <li>If the request http header named <code>$protocolHeader</code> (e.g.
<code>x-forwarded-proto</code>) consists only of forwards that match
+ * <li>If the request http header named <code>$protocolHeader</code> (default
value <code>X-Forwarded-Proto</code>) consists only of forwards that match
* <code>protocolHeaderHttpsValue</code> configuration parameter (default
<code>https</code>) then <code>request.isSecure = true</code>,
* <code>request.scheme = https</code> and <code>request.serverPort =
443</code>. Note that 443 can be overwritten with the
* <code>$httpsServerPort</code> configuration parameter.</li>
@@ -147,7 +147,7 @@ import org.apache.tomcat.util.res.StringManager;
* <td>Name of the http header read by this servlet filter that holds the flag
that this request</td>
* <td>N/A</td>
* <td>Compliant http header name like <code>X-Forwarded-Proto</code>,
<code>X-Forwarded-Ssl</code> or <code>Front-End-Https</code></td>
- * <td><code>null</code></td>
+ * <td><code>X-Forwarded-Proto</code></td>
* </tr>
* <tr>
* <td>protocolHeaderHttpsValue</td>
@@ -1197,7 +1197,7 @@ public class RemoteIpFilter extends GenericFilter {
* request.secure will not be modified.
* </p>
* <p>
- * Default value : <code>null</code>
+ * Default value : <code>X-Forwarded-Proto</code>
* </p>
* @param protocolHeader The header name
*/
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 4fdf62ef0c..eb6346eafc 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -63,7 +63,7 @@ import org.apache.tomcat.util.http.parser.Host;
* <li>otherwise, the ip/host is declared to be the remote ip and looping is
stopped.</li>
* </ul>
* </li>
- * <li>If the request http header named <code>$protocolHeader</code> (e.g.
<code>x-forwarded-proto</code>) consists only of forwards that match
+ * <li>If the request http header named <code>$protocolHeader</code> (default
value <code>X-Forwarded-Proto</code>) consists only of forwards that match
* <code>protocolHeaderHttpsValue</code> configuration parameter (default
<code>https</code>) then <code>request.isSecure = true</code>,
* <code>request.scheme = https</code> and <code>request.serverPort =
443</code>. Note that 443 can be overwritten with the
* <code>$httpsServerPort</code> configuration parameter.</li>
@@ -126,7 +126,7 @@ import org.apache.tomcat.util.http.parser.Host;
* <td>Name of the http header read by this valve that holds the flag that
this request </td>
* <td>N/A</td>
* <td>Compliant http header name like <code>X-Forwarded-Proto</code>,
<code>X-Forwarded-Ssl</code> or <code>Front-End-Https</code></td>
- * <td><code>null</code></td>
+ * <td><code>X-Forwarded-Proto</code></td>
* </tr>
* <tr>
* <td>protocolHeaderHttpsValue</td>
@@ -859,7 +859,7 @@ public class RemoteIpValve extends ValveBase {
* request.secure will not be modified.
* </p>
* <p>
- * Default value : <code>null</code>
+ * Default value : <code>X-Forwarded-Proto</code>
* </p>
* @param protocolHeader The header name
*/
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 648984ef91..6cdd4ad845 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -166,6 +166,11 @@
the Servlet context so that it actually reflects what is used during
authentication. (remm)
</fix>
+ <fix>
+ <bug>66359</bug>: Update javadoc for RemoteIpValve and RemoteIpFilter
with
+ correct <code>protocolHeader</code> default value of
"X-Forwarded-Proto".
+ (lihan)
+ </fix>
<add>
Add support for the new attribute for error dispatches
<code>jakarta.servlet.error.query_string</code>. (markt)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]