You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/04/16 11:47:04 UTC

[tomcat] branch 7.0.x updated: Fix BZ 65235. Correct docs. Expand MBean descriptor.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
     new bc50c78  Fix BZ 65235. Correct docs. Expand MBean descriptor.
bc50c78 is described below

commit bc50c78924c201c6a8f261b54f3aa50eb0f83178
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Apr 16 12:44:40 2021 +0100

    Fix BZ 65235. Correct docs. Expand MBean descriptor.
---
 .../apache/catalina/valves/mbeans-descriptors.xml  | 48 ++++++++++++++--------
 webapps/docs/changelog.xml                         | 12 ++++++
 webapps/docs/config/valve.xml                      |  2 +-
 3 files changed, 44 insertions(+), 18 deletions(-)

diff --git a/java/org/apache/catalina/valves/mbeans-descriptors.xml b/java/org/apache/catalina/valves/mbeans-descriptors.xml
index f4329a2..993ed30 100644
--- a/java/org/apache/catalina/valves/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/valves/mbeans-descriptors.xml
@@ -504,19 +504,31 @@
          type="org.apache.catalina.valves.RemoteIpValve">
 
     <attribute name="asyncSupported"
-               description="Does this valve support async reporting."
+               description="Does this valve support async processing"
+               is="true"
+               type="boolean"/>
+
+    <attribute name="changeLocalName"
+               description="If true the value returned by ServletRequest.getLocalHost() and ServletRequest.getServerHost() is modified by this Valve"
+               is="true"
+               type="boolean"/>
+
+    <attribute name="changeLocalPort"
+               description="If true the value returned by ServletRequest.getLocalPort() and ServletRequest.getServerPort() is modified by this Valve"
                is="true"
                type="boolean"/>
 
     <attribute name="httpServerPort"
                description="Value returned by ServletRequest.getServerPort() when the protocolHeader indicates http protocol"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
 
     <attribute name="httpsServerPort"
                description="Value returned by ServletRequest.getServerPort() when the protocolHeader indicates https protocol"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
+
+    <attribute name="hostHeader"
+               description="The host header (e.g. &quot;X-Forwarded-Host&quot;)"
+               type="java.lang.String"/>
 
     <attribute name="info"
                description="Information about this implementation"
@@ -525,28 +537,31 @@
 
     <attribute name="internalProxies"
                description="Regular expression that matches IP addresses of internal proxies"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
+
+    <attribute name="portHeader"
+               description="The protocol header (e.g. &quot;X-Forwarded-Port&quot;)"
+               type="java.lang.String"/>
 
     <attribute name="protocolHeader"
                description="The protocol header (e.g. &quot;X-Forwarded-Proto&quot;)"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
 
     <attribute name="protocolHeaderHttpsValue"
                description="The value of the protocol header for incoming https request (e.g. &quot;https&quot;)"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
 
     <attribute name="proxiesHeader"
                description="The proxies header name (e.g. &quot;X-Forwarded-By&quot;)"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
 
     <attribute name="remoteIpHeader"
                description="The remote IP header name (e.g. &quot;X-Forwarded-For&quot;)"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
+
+    <attribute name="requestAttributesEnabled"
+               description="If true, the Valve will set the request attributes used by AccessLog implementations to override the values returned by the request for remote address, remote host, server port and protocol"
+               type="boolean"/>
 
     <attribute name="stateName"
                description="The name of the LifecycleState that this component is currently in"
@@ -555,8 +570,7 @@
 
     <attribute name="trustedProxies"
                description="Regular expression that matches IP addresses of trusted proxies"
-               type="java.lang.String"
-               writeable="false" />
+               type="java.lang.String"/>
 
   </mbean>
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b5fa4ef..c436374 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -129,6 +129,18 @@
         <bug>65226</bug>: Fix extraction of JAR name in some cases in
         StandardJarScanner. Submitted by Lynx. (remm)
       </fix>
+      <fix>
+        <bug>65235</bug>: Add missing attributes to the MBean descriptor file
+        for the <code>RemoteIpValve</code>. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+  <subsection name="Web applications">
+    <changelog>
+      <fix>
+        <bug>65235</bug>: Correct name of <code>changeLocalName</code> in the
+        documentation for the <code>RemoteIpValve</code>. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">
diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml
index fbb19fe..3f5d9aa 100644
--- a/webapps/docs/config/valve.xml
+++ b/webapps/docs/config/valve.xml
@@ -936,7 +936,7 @@
          specified, the default of <code>443</code> is used.</p>
       </attribute>
 
-      <attribute name="changeLocalHost" required="false">
+      <attribute name="changeLocalName" required="false">
         <p>If <code>true</code>, the value returned by
         <code>ServletRequest.getLocalHost()</code> and
         <code>ServletRequest.getServerHost()</code> is modified by the this

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