filipw / Strathweb.CacheOutput

ASP.NET Web API CacheOutput - library to allow you to cache the output of ApiControllers
Other
882 stars 253 forks source link

Set ETag when returning a 304 response code #232

Closed Symbianx closed 6 years ago

Symbianx commented 6 years ago

According to the RFC 7232 , the ETag header should be returned when the cache send back a 304 Not Modified status code:

The server generating a 304 response MUST generate any of the following header fields that would have been sent in a 200 (OK) response to the same request: Cache-Control, Content-Location, Date, ETag, Expires, and Vary.

This change adds just that.