Skip to content

Commit 6738ef5

Browse files
committed
moar nits
1 parent 480b3e9 commit 6738ef5

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
@@ -396,7 +396,7 @@ private static string ReadCommonHeader(ref FormatterBinaryReader reader)
396396

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

src/Middleware/OutputCaching/src/OutputCacheMiddleware.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ internal async ValueTask FinalizeCacheBodyAsync(OutputCacheContext context)
415415
|| (cachedResponseBody.Length == 0
416416
&& HttpMethods.IsHead(context.HttpContext.Request.Method)))
417417
{
418-
context.CachedResponse.SetBody(cachedResponseBody, recycleBuffers: true); // transfer lifetime from the buffer to the cached response
418+
// transfer lifetime from the buffer to the cached response
419+
context.CachedResponse.SetBody(cachedResponseBody, recycleBuffers: true);
419420

420421
if (string.IsNullOrEmpty(context.CacheKey))
421422
{

0 commit comments

Comments
 (0)