Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 sensitive, but I want to make sure I follow the standard.

like image 456
Rick Avatar asked Dec 17 '09 15:12

Rick


1 Answers

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.

like image 176
jldupont Avatar answered Sep 30 '22 21:09

jldupont