You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/11/27 21:12:16 UTC

DO NOT REPLY [Bug 46306] New: If-Modified-Since: and If-None-Match: incorrect result

https://issues.apache.org/bugzilla/show_bug.cgi?id=46306

           Summary: If-Modified-Since: and If-None-Match: incorrect result
           Product: Apache httpd-1.3
           Version: 1.3.41
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@wheelhouse.org


We have a URL with two versions, and older one and a newer one.

The older one had these attributes:

Content-Length: 2558
ETag: "1ee799-9fe-49158c39"
Last-Modified: Sat, 08 Nov 2008 12:55:21 GMT

It was then edited and now has these attributes:

Last-Modified: Sat, 08 Nov 2008 13:48:57 GMT
ETag: "1ee799-bb7-491598c9"
Content-Length: 2999

We have a buggy caching client that is sending the following conditionals on a
refresh request:

If-Modified-Since: Sat, 08 Nov 2008 12:55:21 GMT
If-None-Match: "1ee799-bb7-491598c9"

(The IMS is from the older one, but the INM is from the newer one.)

Apache returns a 304 response to this request.

This seems wrong, since RFC 2616 13.3.4 states, "An HTTP/1.1 origin server,
upon receiving a conditional request that includes both a Last-Modified date
(e.g., in an If-Modified-Since or If-Unmodified-Since header field) and one or
more entity tags (e.g., in an If-Match, If-None-Match, or If-Range header
field) as cache validators, MUST NOT return a response status of 304 (Not
Modified) unless doing so is consistent with all of the conditional header
fields in the request." 

The correct behavior would be to return a 200 response with the content, since
the IMS conditional header is not consistent.

The content in this case is a static HTML file, but the problem has been
observed with various other content types as well.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46306] If-Modified-Since: and If-None-Match: incorrect result

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46306

Malte S. Stretz <ms...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Malte S. Stretz <ms...@apache.org> 2011-03-21 12:22:13 EDT ---
This is fixed both in v2.3 and v2.2:

$ for s in www.apache.org msquadrat.de; do
  url=http://$s/robots.txt
  lwp-request -USed -m GET \
    -H "If-Modified-Since: Sat, 08 Nov 2000 00:00:00 GMT" \
    -H "If-None-Match: $(lwp-request -m HEAD "$url" | \
      sed -ne '/^ETag:/{s/^[^:]*: //;p}')" \
    "$url"
done
HEAD http://www.apache.org/robots.txt
If-Modified-Since: Sat, 08 Nov 2000 00:00:00 GMT
If-None-Match: "d20a95-2f-494031bea5f40"
User-Agent: lwp-request/5.834 libwww-perl/5.836

HEAD http://www.apache.org/robots.txt --> 200 OK
Cache-Control: max-age=3600
Connection: close
Date: Mon, 21 Mar 2011 16:18:06 GMT
Accept-Ranges: bytes
ETag: "d20a95-2f-494031bea5f40"
Server: Apache/2.3.8 (Unix) mod_ssl/2.3.8 OpenSSL/1.0.0c
Vary: Accept-Encoding
Content-Length: 47
Content-Type: text/plain
Expires: Mon, 21 Mar 2011 17:18:06 GMT
Last-Modified: Mon, 01 Nov 2010 19:49:41 GMT

HEAD http://msquadrat.de/robots.txt
If-Modified-Since: Sat, 08 Nov 2000 00:00:00 GMT
If-None-Match: "d9-3e26dc70d9240"
User-Agent: lwp-request/5.834 libwww-perl/5.836

HEAD http://msquadrat.de/robots.txt --> 200 OK
Connection: close
Date: Mon, 21 Mar 2011 16:18:10 GMT
Accept-Ranges: bytes
ETag: "d9-3e26dc70d9240"
Server: Apache/2.2.12 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 217
Content-Type: text/plain
Last-Modified: Tue, 24 Aug 2004 22:20:49 GMT


Apache HTTP Server 1.3.x is not supported anymore and no bugs will be fixed in
the old codebase (cf.
<http://mail-archives.apache.org/mod_mbox/httpd-announce/201002.mbox/%3C20100203000334.GA19021@infiltrator.stdlib.net%3E>).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org