我有2个静态资产服务器,apache 2.4.6和nginx 1.5.4。
这是apache服务器请求和响应参数。我希望它应该返回304代码,因为If-None-Match
匹配ETag
和If-Modified-Since
匹配Last-Modified
。但实际返回200码。
nginx是我的预期。
Request URL:http://assets1.isapachexxx.com/js/response.js
Request Method:GET
Status Code:**200 OK**
***Request Headersview parsed***
GET /js/response.js HTTP/1.1
Host: assets1.isapachexxx.com
Connection: keep-alive
Cache-Control: max-age=0
Accept: */*
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4
**If-None-Match: "cbd-4e631377b79b2-gzip"**
**If-Modified-Since: Thu, 12 Sep 2013 15:16:05 GMT**
***Response Headersview parsed***
HTTP/1.1 200 OK
Date: Wed, 18 Sep 2013 08:25:16 GMT
Server: Apache
**Last-Modified: Thu, 12 Sep 2013 15:16:05 GMT**
**ETag: "cbd-4e631377b79b2-gzip"**
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Cache-Control: max-age=1800
Expires: Wed, 18 Sep 2013 08:55:16 GMT
Content-Length: 1223
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/javascript