Should HTTP ETags be case sensitive?
I'm creating a library for handling client caching over HTTP on a web server (i.e., handling of If-Match, If-Modified-Since, If-None-Match, and If-Unmodified-Since HTTP headers), and I'm working on ETags (entity tags) at the moment. My question is should ETags be case sensitive, or case insensitive? I've been looking over RFC 2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) and it doesn't specify.
I can only assume this means they should be case sensi开发者_Python百科tive, but I want to make sure I follow the standard.
The standard says that one must use a "strong validator" for handling ETag: thus, ETags must be treated as opaque values and matched accordingly (i.e. case sensitive).
A server MUST use the strong comparison function (see section 13.3.3) to compare the entity tags in If-Match.
精彩评论