Permalink
Browse files

Use a compliant Expires header value for uncached responses

  • Loading branch information...
PinpointTownes committed Oct 12, 2017
1 parent 3801427 commit 5af1d44f933a1c81f1e159ac2cb7ee949e863d15
@@ -721,7 +721,7 @@ private async Task<bool> SendNativePageAsync(OpenIdConnectResponse response)
Response.Headers[HeaderNames.CacheControl] = "no-cache";
Response.Headers[HeaderNames.Pragma] = "no-cache";
Response.Headers[HeaderNames.Expires] = "-1";
Response.Headers[HeaderNames.Expires] = "Thu, 01 Jan 1970 00:00:00 GMT";
buffer.Seek(offset: 0, loc: SeekOrigin.Begin);
await buffer.CopyToAsync(Response.Body, 4096, Context.RequestAborted);
@@ -764,7 +764,7 @@ private async Task<bool> SendPayloadAsync(OpenIdConnectResponse response)
default:
Response.Headers[HeaderNames.CacheControl] = "no-cache";
Response.Headers[HeaderNames.Pragma] = "no-cache";
Response.Headers[HeaderNames.Expires] = "-1";
Response.Headers[HeaderNames.Expires] = "Thu, 01 Jan 1970 00:00:00 GMT";
break;
}
@@ -747,7 +747,7 @@ private async Task<bool> SendNativePageAsync(OpenIdConnectResponse response)
Response.Headers.Set("Cache-Control", "no-cache");
Response.Headers.Set("Pragma", "no-cache");
Response.Headers.Set("Expires", "-1");
Response.Headers.Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT");
buffer.Seek(offset: 0, loc: SeekOrigin.Begin);
await buffer.CopyToAsync(Response.Body, 4096, Request.CallCancelled);
@@ -790,7 +790,7 @@ private async Task<bool> SendPayloadAsync(OpenIdConnectResponse response)
default:
Response.Headers["Cache-Control"] = "no-cache";
Response.Headers["Pragma"] = "no-cache";
Response.Headers["Expires"] = "-1";
Response.Headers["Expires"] = "Thu, 01 Jan 1970 00:00:00 GMT";
break;
}

0 comments on commit 5af1d44

Please sign in to comment.