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

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit c260e6add354909d13a874d62c8532affc778eb5
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 9 15:57:27 2019 +0100

    Align Javadoc with 8.5.x
---
 java/org/apache/catalina/valves/RemoteIpValve.java | 62 ++++++++++++----------
 1 file changed, 34 insertions(+), 28 deletions(-)

diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java 
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 5b9e921..24e0065 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -49,6 +49,7 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <p>
  * If the incoming <code>request.getRemoteAddr()</code> matches the valve's 
list
  * of internal or trusted proxies:
+ * </p>
  * <ul>
  * <li>Loop on the comma delimited list of IPs and hostnames passed by the 
preceding load balancer or proxy in the given request's Http
  * header named <code>$remoteIpHeader</code> (default value 
<code>x-forwarded-for</code>). Values are processed in right-to-left order.</li>
@@ -64,10 +65,8 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <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>
  * </ul>
- * </p>
- * <p>
- * <strong>Configuration parameters:</strong>
  * <table border="1">
+ * <caption>Configuration parameters</caption>
  * <tr>
  * <th>RemoteIpValve property</th>
  * <th>Description</th>
@@ -145,8 +144,6 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <td>443</td>
  * </tr>
  * </table>
- * </p>
- * <p>
  * <p>
  * This Valve may be attached to any Container, depending on the granularity 
of the filtering you wish to perform.
  * </p>
@@ -158,24 +155,23 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <code>RemoteIpValve</code> uses regular expression to configure 
<code>internalProxies</code> and <code>trustedProxies</code> in the same
  * fashion as {@link RequestFilterValve} does.
  * </p>
- * <hr/>
+ * <hr>
  * <p>
  * <strong>Sample with internal proxies</strong>
  * </p>
  * <p>
  * RemoteIpValve configuration:
  * </p>
- * <code><pre>
+ * <code>
  * &lt;Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   protocolHeader="x-forwarded-proto"
- *   /&gt;</pre></code>
- * <p>
- * Request values:
+ *   /&gt;</code>
  * <table border="1">
+ * <caption>Request Values</caption>
  * <tr>
  * <th>property</th>
  * <th>Value Before RemoteIpValve</th>
@@ -217,27 +213,27 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <td>443</td>
  * </tr>
  * </table>
+ * <p>
  * Note : <code>x-forwarded-by</code> header is null because only internal 
proxies as been traversed by the request.
  * <code>x-forwarded-by</code> is null because all the proxies are trusted or 
internal.
  * </p>
- * <hr/>
+ * <hr>
  * <p>
  * <strong>Sample with trusted proxies</strong>
  * </p>
  * <p>
  * RemoteIpValve configuration:
  * </p>
- * <code><pre>
+ * <code>
  * &lt;Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   trustedProxies="proxy1|proxy2"
- *   /&gt;</pre></code>
- * <p>
- * Request values:
+ *   /&gt;</code>
  * <table border="1">
+ * <caption>Request Values</caption>
  * <tr>
  * <th>property</th>
  * <th>Value Before RemoteIpValve</th>
@@ -259,27 +255,27 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <td>proxy1, proxy2</td>
  * </tr>
  * </table>
+ * <p>
  * Note : <code>proxy1</code> and <code>proxy2</code> are both trusted proxies 
that come in <code>x-forwarded-for</code> header, they both
  * are migrated in <code>x-forwarded-by</code> header. 
<code>x-forwarded-by</code> is null because all the proxies are trusted or 
internal.
  * </p>
- * <hr/>
+ * <hr>
  * <p>
  * <strong>Sample with internal and trusted proxies</strong>
  * </p>
  * <p>
  * RemoteIpValve configuration:
  * </p>
- * <code><pre>
+ * <code>
  * &lt;Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   trustedProxies="proxy1|proxy2"
- *   /&gt;</pre></code>
- * <p>
- * Request values:
+ *   /&gt;</code>
  * <table border="1">
+ * <caption>Request Values</caption>
  * <tr>
  * <th>property</th>
  * <th>Value Before RemoteIpValve</th>
@@ -301,28 +297,28 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <td>proxy1, proxy2</td>
  * </tr>
  * </table>
+ * <p>
  * Note : <code>proxy1</code> and <code>proxy2</code> are both trusted proxies 
that come in <code>x-forwarded-for</code> header, they both
  * are migrated in <code>x-forwarded-by</code> header. As 
<code>192.168.0.10</code> is an internal proxy, it does not appear in
  * <code>x-forwarded-by</code>. <code>x-forwarded-by</code> is null because 
all the proxies are trusted or internal.
  * </p>
- * <hr/>
+ * <hr>
  * <p>
  * <strong>Sample with an untrusted proxy</strong>
  * </p>
  * <p>
  * RemoteIpValve configuration:
  * </p>
- * <code><pre>
+ * <code>
  * &lt;Valve
  *   className="org.apache.catalina.valves.RemoteIpValve"
  *   internalProxies="192\.168\.0\.10|192\.168\.0\.11"
  *   remoteIpHeader="x-forwarded-for"
  *   proxiesHeader="x-forwarded-by"
  *   trustedProxies="proxy1|proxy2"
- *   /&gt;</pre></code>
- * <p>
- * Request values:
+ *   /&gt;</code>
  * <table border="1">
+ * <caption>Request Values</caption>
  * <tr>
  * <th>property</th>
  * <th>Value Before RemoteIpValve</th>
@@ -344,8 +340,9 @@ import org.apache.tomcat.util.http.MimeHeaders;
  * <td>proxy1</td>
  * </tr>
  * </table>
+ * <p>
  * Note : <code>x-forwarded-by</code> holds the trusted proxy 
<code>proxy1</code>. <code>x-forwarded-by</code> holds
- * <code>140.211.11.130</code> because <code>untrusted-proxy</code> is not 
trusted and thus, we can not trust that
+ * <code>140.211.11.130</code> because <code>untrusted-proxy</code> is not 
trusted and thus, we cannot trust that
  * <code>untrusted-proxy</code> is the actual remote ip. 
<code>request.remoteAddr</code> is <code>untrusted-proxy</code> that is an IP
  * verified by <code>proxy1</code>.
  * </p>
@@ -369,7 +366,7 @@ public class RemoteIpValve extends ValveBase {
 
     /**
      * Convert a given comma delimited String into an array of String
-     *
+     * @param commaDelimitedStrings The string to convert
      * @return array of String (non <code>null</code>)
      */
     protected static String[] commaDelimitedListToStringArray(String 
commaDelimitedStrings) {
@@ -379,6 +376,8 @@ public class RemoteIpValve extends ValveBase {
 
     /**
      * Convert an array of strings in a comma delimited string
+     * @param stringList The string list to convert
+     * @return The concatenated string
      */
     protected static String listToCommaDelimitedString(List<String> 
stringList) {
         if (stringList == null) {
@@ -758,6 +757,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : 80
      * </p>
+     * @param httpServerPort The server port
      */
     public void setHttpServerPort(int httpServerPort) {
         this.httpServerPort = httpServerPort;
@@ -770,6 +770,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : 443
      * </p>
+     * @param httpsServerPort The server port
      */
     public void setHttpsServerPort(int httpsServerPort) {
         this.httpsServerPort = httpsServerPort;
@@ -782,6 +783,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : 
10\.\d{1,3}\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3}|169\.254.\d{1,3}.\d{1,3}|127\.\d{1,3}\.\d{1,3}\.\d{1,3}|0:0:0:0:0:0:0:1
      * </p>
+     * @param internalProxies The proxy regular expression
      */
     public void setInternalProxies(String internalProxies) {
         if (internalProxies == null || internalProxies.length() == 0) {
@@ -799,6 +801,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : <code>null</code>
      * </p>
+     * @param protocolHeader The header name
      */
     public void setProtocolHeader(String protocolHeader) {
         this.protocolHeader = protocolHeader;
@@ -811,6 +814,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : <code>https</code>
      * </p>
+     * @param protocolHeaderHttpsValue The header name
      */
     public void setProtocolHeaderHttpsValue(String protocolHeaderHttpsValue) {
         this.protocolHeaderHttpsValue = protocolHeaderHttpsValue;
@@ -831,6 +835,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : <code>X-Forwarded-By</code>
      * </p>
+     * @param proxiesHeader The header name
      */
     public void setProxiesHeader(String proxiesHeader) {
         this.proxiesHeader = proxiesHeader;
@@ -847,7 +852,7 @@ public class RemoteIpValve extends ValveBase {
      * Default value : <code>X-Forwarded-For</code>
      * </p>
      *
-     * @param remoteIpHeader
+     * @param remoteIpHeader The header name
      */
     public void setRemoteIpHeader(String remoteIpHeader) {
         this.remoteIpHeader = remoteIpHeader;
@@ -884,6 +889,7 @@ public class RemoteIpValve extends ValveBase {
      * <p>
      * Default value : empty list, no external proxy is trusted.
      * </p>
+     * @param trustedProxies The regular expression
      */
     public void setTrustedProxies(String trustedProxies) {
         if (trustedProxies == null || trustedProxies.length() == 0) {


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

Reply via email to