From: markt Date: Mon, 14 Dec 2009 21:18:34 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48387 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=89d8cf0def5f5b198938ac0068fabaea0bd93bfc;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48387 Make configuration attributes consistent between Filter and Valves Patch provided by Cyrille Le Clerc git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@890483 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java b/java/org/apache/catalina/filters/RemoteIpFilter.java index 5a358473e..9f0d20dc8 100644 --- a/java/org/apache/catalina/filters/RemoteIpFilter.java +++ b/java/org/apache/catalina/filters/RemoteIpFilter.java @@ -143,9 +143,10 @@ import org.apache.juli.logging.LogFactory; *

*

* Regular expression vs. IP address blocks: mod_remoteip allows to use address blocks (e.g. - * 192.168/16) to configure RemoteIPInternalProxy and RemoteIPTrustedProxy ; as the JVM doesnt have a + * 192.168/16) to configure RemoteIPInternalProxy and RemoteIPTrustedProxy ; as the JVM doesn't have a * library similar to apr_ipsubnet_test. + * href="http://apr.apache.org/docs/apr/1.3/group__apr__network__io.html#gb74d21b8898b7c40bf7fd07ad3eb993d">apr_ipsubnet_test, we rely on + * regular expressions. *

*
*

@@ -585,7 +586,7 @@ public class RemoteIpFilter implements Filter { protected static final String PROTOCOL_HEADER_PARAMETER = "protocolHeader"; - protected static final String PROTOCOL_HEADER_SSL_VALUE_PARAMETER = "protocolHeaderSslValue"; + protected static final String PROTOCOL_HEADER_HTTPS_VALUE_PARAMETER = "protocolHeaderHttpsValue"; protected static final String PROXIES_HEADER_PARAMETER = "proxiesHeader"; @@ -671,7 +672,7 @@ public class RemoteIpFilter implements Filter { */ private String protocolHeader = null; - private String protocolHeaderSslValue = "https"; + private String protocolHeaderHttpsValue = "https"; /** * @see #setProxiesHeader(String) @@ -743,7 +744,7 @@ public class RemoteIpFilter implements Filter { if (protocolHeader != null) { String protocolHeaderValue = request.getHeader(protocolHeader); - if (protocolHeaderValue != null && protocolHeaderSslValue.equalsIgnoreCase(protocolHeaderValue)) { + if (protocolHeaderValue != null && protocolHeaderHttpsValue.equalsIgnoreCase(protocolHeaderValue)) { xRequest.setSecure(true); xRequest.setScheme("https"); xRequest.setServerPort(httpsServerPort); @@ -790,8 +791,8 @@ public class RemoteIpFilter implements Filter { return protocolHeader; } - public String getProtocolHeaderSslValue() { - return protocolHeaderSslValue; + public String getProtocolHeaderHttpsValue() { + return protocolHeaderHttpsValue; } public String getProxiesHeader() { @@ -815,8 +816,8 @@ public class RemoteIpFilter implements Filter { setProtocolHeader(filterConfig.getInitParameter(PROTOCOL_HEADER_PARAMETER)); } - if (filterConfig.getInitParameter(PROTOCOL_HEADER_SSL_VALUE_PARAMETER) != null) { - setProtocolHeaderSslValue(filterConfig.getInitParameter(PROTOCOL_HEADER_SSL_VALUE_PARAMETER)); + if (filterConfig.getInitParameter(PROTOCOL_HEADER_HTTPS_VALUE_PARAMETER) != null) { + setProtocolHeaderHttpsValue(filterConfig.getInitParameter(PROTOCOL_HEADER_HTTPS_VALUE_PARAMETER)); } if (filterConfig.getInitParameter(PROXIES_HEADER_PARAMETER) != null) { @@ -879,14 +880,14 @@ public class RemoteIpFilter implements Filter { /** *

- * Case insensitive value of the protocol header to indicate that the incoming http request uses SSL. + * Case insensitive value of the protocol header to indicate that the incoming http request uses HTTPS. *

*

- * Default value : HTTPS + * Default value : https *

*/ - public void setProtocolHeaderSslValue(String protocolHeaderSslValue) { - this.protocolHeaderSslValue = protocolHeaderSslValue; + public void setProtocolHeaderHttpsValue(String protocolHeaderHttpsValue) { + this.protocolHeaderHttpsValue = protocolHeaderHttpsValue; } /**