Re: Want to avoid 304 error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/23/07, Bello Martinez Sergio <serbel@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux