alex.net
alex.net

Reputation: 286

mod_cache + ETag: Apache does not reply 304 to client

I have a problem with mod_cache and ETags. Here's my scenario:

Environment: Firefox, Apache 2.2.22 (Mac OSX default), any Web App, Apache is a proxy to the Web App

Initial State:

Scenario:

Shouldn't Apache return 304 to the Browser?

Additional Info:

A much simpler scenario:

apache conf

CacheRoot /private/var/log/apache2/cache/
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
CacheIgnoreCacheControl On
CacheIgnoreHeaders Set-Cookie

<Proxy *>
   Order deny,allow
   Allow from all
</Proxy>

ProxyPass / ajp://localhost:8009/ retry=0
ProxyPassReverse / ajp://localhost:8009/
ProxyPreserveHost on

Request/Response Headers:

GET / HTTP/1.1
Accept: */*
If-None-Match: 123456

HTTP/1.1 200 OK
Date: Tue, 01 Oct 2013 14:01:16 GMT
ETag: 123456
Expires: Tue, 01 Oct 2013 14:30:55 GMT
Cache-Control: max-age=1800
Content-Language: en-US
Age: 21
Content-Length: 20186
Content-Type: text/html;charset=UTF-8

Upvotes: 3

Views: 1674

Answers (1)

JakubKnejzlik
JakubKnejzlik

Reputation: 6493

According to protocol specification the If-None-Match header should be wrapped with ".

Try sending:

If-None-Match: "123"

Upvotes: 1

Related Questions