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 2007/03/03 17:03:12 UTC
svn commit: r514179 - in /tomcat/tc6.0.x/trunk:
java/org/apache/catalina/servlets/DefaultServlet.java
webapps/docs/changelog.xml
Author: markt
Date: Sat Mar 3 08:03:11 2007
New Revision: 514179
URL: http://svn.apache.org/viewvc?view=rev&rev=514179
Log:
Port fix for bug 41666. Correct handling of boundary conditions for If-Unmodified-Since and If-Modified-Since headers. Patch provided by Suzuki Yuichiro.
Update changelog.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?view=diff&rev=514179&r1=514178&r2=514179
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Sat Mar 3 08:03:11 2007
@@ -1567,7 +1567,7 @@
// If an If-None-Match header has been specified, if modified since
// is ignored.
if ((request.getHeader("If-None-Match") == null)
- && (lastModified <= headerValue + 1000)) {
+ && (lastModified < headerValue + 1000)) {
// The entity has not been modified since the date
// specified by the client. This is not an error case.
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
@@ -1658,7 +1658,7 @@
long lastModified = resourceAttributes.getLastModified();
long headerValue = request.getDateHeader("If-Unmodified-Since");
if (headerValue != -1) {
- if ( lastModified > (headerValue + 1000)) {
+ if ( lastModified >= (headerValue + 1000)) {
// The entity has not been modified since the date
// specified by the client. This is not an error case.
response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
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?view=diff&rev=514179&r1=514178&r2=514179
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Mar 3 08:03:11 2007
@@ -18,6 +18,11 @@
<subsection name="Catalina">
<changelog>
<fix>
+ <bug>41666</bug> Correct handling of boundary conditions for
+ If-Unmodified-Since and If-Modified-Since headers. Patch provided by
+ Suzuki Yuichiro. (markt)
+ </fix>
+ <fix>
<bug>41739</bug> Correct handling of servlets with a load-on-startup
value of zero. These are now the first servlets to be started. (markt)
</fix>
@@ -33,6 +38,9 @@
when the serviet is reading/writing from the input/output streams
The flag is <code>-Dorg.apache.tomcat.util.net.NioSelectorShared=true</code>
</update>
+ <fix>
+ Requests with multiple content-length headers are now rejected. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Webapps">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org