If none of the entity tags match, then the server MAY perform the requested method as if the If-None-Match header field did not exist, but MUST also ignore any If-Modified-Since header field(s) in the request. That is, if no entity tags match, then the server MUST NOT return a 304 (Not Modified) response.
If both an entity tag and a Last-Modified value have been provided by the origin server, SHOULD use both validators in cache-conditional requests. This allows both HTTP/1.0 and HTTP/1.1 caches to respond appropriately.
发布评论
评论(2)
If none of the entity tags match, then the server MAY perform the requested method as if the If-None-Match header field did not exist, but MUST also ignore any If-Modified-Since header field(s) in the request. That is, if no entity tags match, then the server MUST NOT return a 304 (Not Modified) response.
详情见
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html 14.26 If-None-Match
根据 RFC 规范 13.3.4:
这意味着:如果 Last-Modified 和 ETag 同时被使用,则要求它们的验证都必须通过才会返回 304,若其中某个验证没通过,则服务器会按常规返回资源实体及 200 状态码。