Skip to content

Commit e791702

Browse files
committed
moar nits
1 parent 38d23e8 commit e791702

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Middleware/OutputCaching/src/OutputCacheEntryFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ private static string ReadCommonHeader(ref FormatterBinaryReader reader)
364364

365365
static readonly string[] CommonHeaders = new string[]
366366
{
367-
// to remove values, use ""; DO NOT just remove the line, and do not re-order
367+
// DO NOT remove values, and do not re-order/insert - append only
368368
// NOTE: arbitrary common strings are fine - it doesn't all have to be headers
369369
HeaderNames.Accept,
370370
HeaderNames.AcceptCharset,

src/Middleware/OutputCaching/src/OutputCacheMiddleware.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ internal async ValueTask FinalizeCacheBodyAsync(OutputCacheContext context)
402402
|| (cachedResponseBody.Length == 0
403403
&& HttpMethods.IsHead(context.HttpContext.Request.Method)))
404404
{
405-
context.CachedResponse.SetBody(cachedResponseBody, recycleBuffers: true); // transfer lifetime from the buffer to the cached response
405+
// transfer lifetime from the buffer to the cached response
406+
context.CachedResponse.SetBody(cachedResponseBody, recycleBuffers: true);
406407

407408
if (string.IsNullOrEmpty(context.CacheKey))
408409
{

0 commit comments

Comments
 (0)