httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Want to avoid 304 error
Date Mon, 23 Jul 2007 18:19:10 GMT
On 7/23/07, Bello Martinez Sergio <serbel@televes.es> wrote:

> - Headers request/response after expiry time:

>
>     HTTP/1.x 304 Not Modified
>     Date: Mon, 23 Jul 2007 17:49:31 GMT
>     Server: Apache/2.0.54 (Linux/SUSE)
>     Connection: Keep-Alive
>     Keep-Alive: timeout=15, max=98

So, here's your problem. The server reports that the resource is not
modified, but does not send a new Cache-Control: max-age or Expires
header. The old headers are therefore kept as valid, meaning that the
resource is not-modified, but expired.

Here's a similar set of headers from apache's core handler:
Original:
HTTP/1.1 200 OK
Date: Mon, 23 Jul 2007 18:11:38 GMT
Server: Apache/2.3.0-dev (Unix)
Last-Modified: Wed, 11 Jul 2007 08:03:12 GMT
ETag: "9276b6-4527-4f313000"
Accept-Ranges: bytes
Content-Length: 17703
Cache-Control: max-age=86400
Expires: Tue, 24 Jul 2007 18:11:38 GMT
Vary: Accept-Encoding
Connection: close
Content-Type: text/html

If-Modifed-Since request:
HTTP/1.1 304 Not Modified
Date: Mon, 23 Jul 2007 18:11:52 GMT
Server: Apache/2.3.0-dev (Unix)
ETag: "9276b6-4527-4f313000"
Expires: Tue, 24 Jul 2007 18:11:52 GMT
Cache-Control: max-age=86400
Vary: Accept-Encoding

Note the Cache-Control and Expires headers which update the client's
freshness info.

Then the question is: why aren't these headers getting sent on your
304 responses. I don't know whether this is a problem with your
application or with apache, but given that I know nothing about your
app, I'm putting my guess there ;-)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message