Author: markt
Date: Tue Apr 20 19:44:00 2010
New Revision: 936045

URL: http://svn.apache.org/viewvc?rev=936045&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48983
Improve debug logging for situations when RemoteIpValve is bypassed
Patch provided by Cyrille Le Clerc
I kept the code the same as Tomcat 7

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=936045&r1=936044&r2=936045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Apr 20 19:44:00 2010
@@ -234,15 +234,6 @@ PATCHES PROPOSED TO BACKPORT:
     message text ("starting"),  vs. what actually happened (initialize()) -
     I won't insist on fixing that inconsistency.
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48983
-  Improve debug logging for situations when RemoteIpValve is bypassed
-  https://issues.apache.org/bugzilla/attachment.cgi?id=25181
-  Patch provided by Cyrille Le Clerc
-  +1: markt, kkolinko, rjung
-  -1: 
-  rjung: maybe using originalRemoteAddr instead of request.getRemoteAddr().
-  kkolinko: I agree with rjung, though the difference will be not noticeable
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48379
   Make session cookie name, domain and path configurable per context.
   http://people.apache.org/~markt/patches/2010-04-08-bug48379.patch

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java?rev=936045&r1=936044&r2=936045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java Tue 
Apr 20 19:44:00 2010
@@ -627,6 +627,11 @@ public class RemoteIpValve extends Valve
                           + originalScheme + "' will be seen as 
newRemoteAddr='" + request.getRemoteAddr() + "', newRemoteHost='"
                           + request.getRemoteHost() + "', newScheme='" + 
request.getScheme() + "', newSecure='" + request.isSecure() + "'");
             }
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug("Skip RemoteIpValve for request " + 
request.getRequestURI() + " with originalRemoteAddr '"
+                        + request.getRemoteAddr() + "'");
+            }
         }
         try {
             getNext().invoke(request, response);

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=936045&r1=936044&r2=936045&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Apr 20 19:44:00 2010
@@ -74,6 +74,11 @@
         process of clearing them is not thread-safe. (markt)
       </fix>
       <fix>
+        <bug>48983</bug>: Improve debug logging for situations when
+        <code>RemoteIpValve</code> is bypassed. Patch provided by Cyrille Le
+        Clerc. (markt)
+      </fix>
+      <fix>
         <bug>49018</bug>: Fix processing of time argument in the Expire 
sessions 
         action in the Manager web application. (kkolinko)
       </fix>



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

Reply via email to