You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2007/12/09 01:44:27 UTC

svn commit: r602593 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java webapps/docs/changelog.xml

Author: billbarker
Date: Sat Dec  8 16:44:26 2007
New Revision: 602593

URL: http://svn.apache.org/viewvc?rev=602593&view=rev
Log:
Port fix for BZ 43687

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java?rev=602593&r1=602592&r2=602593&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java Sat Dec  8 16:44:26 2007
@@ -402,12 +402,20 @@
 
         MimeHeaders rmh = request.getCoyoteRequest().getMimeHeaders();
         rmh.recycle();
+        boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) ||
+                           "HEAD".equalsIgnoreCase(saved.getMethod());
         Iterator names = saved.getHeaderNames();
         while (names.hasNext()) {
             String name = (String) names.next();
-            Iterator values = saved.getHeaderValues(name);
-            while (values.hasNext()) {
-                rmh.addValue(name).setString( (String)values.next() );
+            // The browser isn't expecting this conditional response now.
+            // Assuming that it can quietly recover from an unexpected 412.
+            // BZ 43687
+            if(!("If-Modified-Since".equalsIgnoreCase(name) ||
+                 (cachable && "If-None-Match".equalsIgnoreCase(name)))) {
+                Iterator values = saved.getHeaderValues(name);
+                while (values.hasNext()) {
+                    rmh.addValue(name).setString( (String)values.next() );
+                }
             }
         }
         

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=602593&r1=602592&r2=602593&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat Dec  8 16:44:26 2007
@@ -63,6 +63,9 @@
       <fix>
         o.a.juli.ClassLoaderLogManager handle more then one system property replacement at file logging.properties. (pero)
       </fix>     
+      <fix>
+        <bug>43687</bug> Remove conditional headers on Form Auth replay, since the UA (esp. FireFox) isn't expecting it. (billbarker)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper" >



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