This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 26f9951373 BZ 66359 - Update javadoc for RemoteIpFilter and RemoteIpValve 26f9951373 is described below commit 26f99513735cfa2917eecbc818f46fc52da0a256 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 a264ef27e5..6f13a1795e 100644 --- a/java/org/apache/catalina/filters/RemoteIpFilter.java +++ b/java/org/apache/catalina/filters/RemoteIpFilter.java @@ -84,7 +84,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> @@ -148,7 +148,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> @@ -1224,7 +1224,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 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 547340eab0..084a84c529 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -119,6 +119,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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org