1 write to HttpContext
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingContext.cs (1)
25
HttpContext
= httpContext;
34 references to HttpContext
Microsoft.AspNetCore.ResponseCaching (34)
ResponseCachingContext.cs (4)
65
if (HeaderUtilities.TryParseDate(
HttpContext
.Response.Headers.Date.ToString(), out date))
92
if (HeaderUtilities.TryParseDate(
HttpContext
.Response.Headers.Expires.ToString(), out expires))
112
HeaderUtilities.TryParseSeconds(
HttpContext
.Response.Headers.CacheControl, CacheControlHeaderValue.SharedMaxAgeString, out _responseSharedMaxAge);
125
HeaderUtilities.TryParseSeconds(
HttpContext
.Response.Headers.CacheControl, CacheControlHeaderValue.MaxAgeString, out _responseMaxAge);
ResponseCachingKeyProvider.cs (5)
41
var request = context.
HttpContext
.Request;
90
var request = context.
HttpContext
.Request;
106
var requestHeaders = context.
HttpContext
.Request.Headers;
135
var queryArray = context.
HttpContext
.Request.Query.ToArray();
164
var queryKeyValues = context.
HttpContext
.Request.Query[queryKey];
ResponseCachingMiddleware.cs (19)
155
context.
HttpContext
.Response.StatusCode = StatusCodes.Status304NotModified;
163
context.
HttpContext
.Response.Headers[key] = values;
170
var response = context.
HttpContext
.Response;
189
await body.CopyToAsync(response.BodyWriter, context.
HttpContext
.RequestAborted);
193
context.
HttpContext
.Abort();
230
if (HeaderUtilities.ContainsCacheDirective(context.
HttpContext
.Request.Headers.CacheControl, CacheControlHeaderValue.OnlyIfCachedString))
233
context.
HttpContext
.Response.StatusCode = StatusCodes.Status504GatewayTimeout;
254
var response = context.
HttpContext
.Response;
257
var varyQueryKeys = new StringValues(context.
HttpContext
.Features.Get<IResponseCachingFeature>()?.VaryByQueryKeys);
339
var contentLength = context.
HttpContext
.Response.ContentLength;
343
&& HttpMethods.IsHead(context.
HttpContext
.Request.Method)))
345
var response = context.
HttpContext
.Response;
404
context.OriginalResponseStream = context.
HttpContext
.Response.Body;
410
context.
HttpContext
.Response.Body = context.ResponseCachingStream;
413
AddResponseCachingFeature(context.
HttpContext
);
422
context.
HttpContext
.Response.Body = context.OriginalResponseStream;
425
RemoveResponseCachingFeature(context.
HttpContext
);
431
var ifNoneMatchHeader = context.
HttpContext
.Request.Headers.IfNoneMatch;
459
var ifModifiedSince = context.
HttpContext
.Request.Headers.IfModifiedSince;
ResponseCachingPolicyProvider.cs (6)
14
var request = context.
HttpContext
.Request;
35
var requestHeaders = context.
HttpContext
.Request.Headers;
63
return !HeaderUtilities.ContainsCacheDirective(context.
HttpContext
.Request.Headers.CacheControl, CacheControlHeaderValue.NoStoreString);
68
var responseCacheControlHeader = context.
HttpContext
.Response.Headers.CacheControl;
91
var response = context.
HttpContext
.Response;
170
var requestCacheControlHeaders = context.
HttpContext
.Request.Headers.CacheControl;