This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new bdbb26ecff BZ 66359 - Update javadoc for RemoteIpFilter and RemoteIpValve bdbb26ecff is described below commit bdbb26ecff802cf1388856d35a689105f545b97a 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 6a4570800d..bff881e161 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 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 83a1958221..a140055a53 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -124,6 +124,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