Hi Bill,

can we fix this bug also at Tomcat 5.5?

regards
Peter



Am 29.11.2007 um 05:19 schrieb [EMAIL PROTECTED]:

Author: billbarker
Date: Wed Nov 28 20:19:46 2007
New Revision: 599259

URL: http://svn.apache.org/viewvc?rev=599259&view=rev
Log:
Remove conditional headers on Form Auth replay, since the UA (esp. FireFox) isn't expecting it.

Fix for bug #43687

Reported by:   Przemyslaw Madzik


Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/authenticator/ FormAuthenticator.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=599259&r1=599258&r2=599259&view=diff ====================================================================== ========
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Nov 28 20:19:46 2007
@@ -31,11 +31,6 @@
   +1: jfclere
-1: fhanik - Can we add the 'package' directive to make the package match the dir structure

-* Remove conditional headers on Form Auth replay, since the UA (esp. FireFox) isn't expecting it.
-  http://issues.apache.org/bugzilla/show_bug.cgi?id=43687
-  +1: billbarker, remm, jfclere, pero
-  -1:
-
 * Fix another license issue
   http://svn.apache.org/viewvc?rev=598412&view=rev
   +1: markt, fhanik, pero, remm, billbarker

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ authenticator/FormAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/ apache/catalina/authenticator/FormAuthenticator.java? rev=599259&r1=599258&r2=599259&view=diff ====================================================================== ======== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/authenticator/ FormAuthenticator.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/authenticator/ FormAuthenticator.java Wed Nov 28 20:19:46 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/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/ changelog.xml?rev=599259&r1=599258&r2=599259&view=diff ====================================================================== ========
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Nov 28 20:19:46 2007
@@ -72,6 +72,9 @@
Improve the webDAV Servlet Javadocs to make clear that the WebDAV
         Servlet can not be used as the default servlet. (markt)
       </update>
+ <fix><bug>43687</bug> Remove conditional headers on Form Auth replay,
+           since the UA (esp. FireFox) isn't expecting it.
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to