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 2006/12/21 22:19:14 UTC

DO NOT REPLY [Bug 41230] New: - HEAD requests on expired cache content are incorrect

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230

           Summary: HEAD requests on expired cache content are incorrect
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: basam@stream.aol.net


I am running httpd 2.2.3 with mod_cache in reverse proxy mode. The content being
cached has a max-age of 0 so the cache is allowed to store it but must always
validate it with the origin. If one does an unconditional HEAD on a piece of
content that has been cached on the edge, you get a "HTTP 304 Not Modified"
instead of a 200.

Here is the headers from the origin in response to a first time request,

HTTP/1.1 200 OK
Date: Thu, 21 Dec 2006 21:05:11 GMT
Server: Apache
Last-Modified: Fri, 01 Dec 2006 22:35:51 GMT
ETag: "4809a-4f-9f42dfc0"
Accept-Ranges: bytes
Content-Length: 79
Cache-Control: max-age=0, no-transform
Expires: Thu, 21 Dec 2006 21:06:39 GMT
svct: D=27819 usec
Content-Type: text/html
Connection: close

Below is the HEAD request followed by the reply.

HEAD /testing/basam/test.html HTTP/1.1
Host: edge.stream.aol.com

HTTP/1.1 304 Not Modified
Date: Thu, 21 Dec 2006 21:06:28 GMT
Server: Apache
Connection: close
ETag: "4809a-4f-9f42dfc0"
Expires: Thu, 21 Dec 2006 21:07:56 GMT
Cache-Control: max-age=0

Below is the debug output from apache for the HEAD request.

[Thu Dec 21 21:06:32 2006] [debug] mod_disk_cache.c(477): disk_cache: Recalled
cached URL info header http://edge.stream.aol.com:80/testing/basam/test.html?
[Thu Dec 21 21:06:32 2006] [debug] mod_disk_cache.c(750): disk_cache: Recalled
headers for URL http://edge.stream.aol.com:80/testing/basam/test.html?
[Thu Dec 21 21:06:32 2006] [debug] cache_storage.c(272): Cached response for
/testing/basam/test.html isn't fresh.  Adding/replacing conditional request headers.
[Thu Dec 21 21:06:32 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE filter
for /testing/basam/test.html
[Thu Dec 21 21:06:32 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL
filter for /testing/basam/test.html
[Thu Dec 21 21:06:32 2006] [debug] mod_proxy_http.c(54): proxy: HTTP:
canonicalising URL //origin.stream.aol.com/testing/basam/test.html
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(1378): [client 127.0.0.1] proxy:
http: found worker http://origin.stream.aol.com/ for
http://origin.stream.aol.com/testing/basam/test.html [Thu Dec 21 21:06:32 2006]
[debug] mod_proxy.c(756): Running scheme http handler (attempt 0)
[Thu Dec 21 21:06:32 2006] [debug] mod_proxy_http.c(1662): proxy: HTTP: serving
URL http://origin.stream.aol.com/testing/basam/test.html
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(1798): proxy: HTTP: has acquired
connection for (origin.stream.aol.com)
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(1858): proxy: connecting
http://origin.stream.aol.com/testing/basam/test.html to origin.stream.aol.com:80
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(1951): proxy: connected
/testing/basam/test.html to origin.stream.aol.com:80
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(2045): proxy: HTTP: fam 2 socket
created to connect to origin.stream.aol.com
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(2141): proxy: HTTP: connection
complete to 10.1.10.15:80 (origin.stream.aol.com)
[Thu Dec 21 21:06:32 2006] [debug] mod_proxy_http.c(1541): proxy: header only
[Thu Dec 21 21:06:32 2006] [debug] mod_cache.c(502): cache:
/testing/basam/test.html not cached. Reason: HTTP HEAD request
[Thu Dec 21 21:06:32 2006] [debug] proxy_util.c(1816): proxy: HTTP: has released
connection for (origin.stream.aol.com)

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

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


DO NOT REPLY [Bug 41230] - HEAD requests on expired cache content are incorrect

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230





------- Additional Comments From nikke@acc.umu.se  2007-05-02 06:57 -------
Created an attachment (id=20090)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20090&action=view)
Fix 304 on HEAD on expired object

This patch fixes this for us (httpd-2.2.4 + patch for PR41475 + our
mod_disk_cache patches). If running the standard mod_disk_cache then expired
objects won't be deleted from the cache when they can't be revalidated, but
it will at least return the correct status code to the client.

For full discussion see the thread on dev@httpd:
http://mail-archives.apache.org/mod_mbox/httpd-dev/200704.mbox/%3cPine.GSO.4.64.0704131659050.7482@kleopatra.acc.umu.se%3e


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

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


DO NOT REPLY [Bug 41230] - HEAD requests on expired cache content are incorrect

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230





------- Additional Comments From basam@stream.aol.net  2007-05-15 09:02 -------

I have verified this patch works in our environment which is mod_cache for 2.2.4
+ patch for PR41484.

thanks,
          Sridhar

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

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


DO NOT REPLY [Bug 41230] - HEAD requests on expired cache content are incorrect

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230


nick@webthing.com changed:

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




------- Additional Comments From nick@webthing.com  2007-09-28 14:35 -------
Looks like it.  You could even have marked it fixed yourself!

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

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


DO NOT REPLY [Bug 41230] - HEAD requests on expired cache content are incorrect

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230





------- Additional Comments From nikke@acc.umu.se  2007-09-28 13:40 -------
This bug is supposedly fixed in httpd 2.2.6, and should thus be closed.

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

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


DO NOT REPLY [Bug 41230] - HEAD requests on expired cache content are incorrect

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230


slive@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable




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

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


DO NOT REPLY [Bug 41230] - HEAD requests on expired cache content are incorrect

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41230>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41230


nikke@acc.umu.se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nikke@acc.umu.se




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

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