You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by li...@apache.org on 2022/11/22 03:17:38 UTC

[tomcat] branch 8.5.x updated: BZ 66359 - Update javadoc for RemoteIpFilter and RemoteIpValve

This is an automated email from the ASF dual-hosted git repository.

lihan 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 e5b367e827 BZ 66359 - Update javadoc for RemoteIpFilter and RemoteIpValve
e5b367e827 is described below

commit e5b367e82764014c145503d082a531755ac349f6
Author: lihan <li...@apache.org>
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 54cf3ea604..6d68a97b42 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -80,7 +80,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>
@@ -144,7 +144,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>
@@ -1226,7 +1226,7 @@ public class RemoteIpFilter implements Filter {
      * 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 3365bcc20c..688515de14 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -65,7 +65,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>
@@ -128,7 +128,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>
@@ -887,7 +887,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 1c639c9772..218df3261b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -112,6 +112,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>
     </changelog>
   </subsection>
   <subsection name="Coyote">


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