Skip to content

Commit 46e553c

Browse files
authored
Merge pull request filipw#232 from Symbianx/patch-1
Set ETag when returning a 304 response code
2 parents ebaf1fc + 85b7927 commit 46e553c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/WebApi.OutputCache.V2/CacheOutputAttribute.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ public override void OnActionExecuting(HttpActionContext actionContext)
194194
{
195195
var time = CacheTimeQuery.Execute(DateTime.Now);
196196
var quickResponse = actionContext.Request.CreateResponse(HttpStatusCode.NotModified);
197+
198+
SetEtag(quickResponse, etag);
197199
ApplyCacheHeaders(quickResponse, time);
198200
actionContext.Response = quickResponse;
199201
return;

0 commit comments

Comments
 (0)