This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React to string[] -> StringValues changes.
- Loading branch information
Showing
42 changed files
with
154 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
using System.Linq; | ||
using Microsoft.AspNet.Mvc.Core; | ||
using Microsoft.Framework.Internal; | ||
using Microsoft.Net.Http.Headers; | ||
|
||
namespace Microsoft.AspNet.Mvc | ||
{ | ||
|
@@ -94,24 +95,24 @@ public void OnActionExecuting([NotNull] ActionExecutingContext context) | |
var headers = context.HttpContext.Response.Headers; | ||
|
||
// Clear all headers | ||
headers.Remove("Vary"); | ||
headers.Remove("Cache-control"); | ||
headers.Remove("Pragma"); | ||
headers.Remove(HeaderNames.Vary); | ||
headers.Remove(HeaderNames.CacheControl); | ||
headers.Remove(HeaderNames.Pragma); | ||
|
||
if (!string.IsNullOrEmpty(VaryByHeader)) | ||
{ | ||
headers.Set("Vary", VaryByHeader); | ||
headers[HeaderNames.Vary] = VaryByHeader; | ||
} | ||
|
||
if (NoStore) | ||
{ | ||
headers.Set("Cache-control", "no-store"); | ||
headers[HeaderNames.CacheControl] = "no-store"; | ||
|
||
// Cache-control: no-store, no-cache is valid. | ||
if (Location == ResponseCacheLocation.None) | ||
{ | ||
headers.Append("Cache-control", "no-cache"); | ||
headers.Set("Pragma", "no-cache"); | ||
headers.AppendCommaSeparatedValues(HeaderNames.CacheControl, "no-cache"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Tratcher
Author
Member
|
||
headers[HeaderNames.Pragma] = "no-cache"; | ||
} | ||
} | ||
else | ||
|
@@ -127,7 +128,7 @@ public void OnActionExecuting([NotNull] ActionExecutingContext context) | |
break; | ||
case ResponseCacheLocation.None: | ||
cacheControlValue = "no-cache"; | ||
headers.Set("Pragma", "no-cache"); | ||
headers[HeaderNames.Pragma] = "no-cache"; | ||
break; | ||
} | ||
|
||
|
@@ -140,7 +141,7 @@ public void OnActionExecuting([NotNull] ActionExecutingContext context) | |
|
||
if (cacheControlValue != null) | ||
{ | ||
headers.Set("Cache-control", cacheControlValue); | ||
headers[HeaderNames.CacheControl] = cacheControlValue; | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Sort to hurt you so, but this has changed, you'll have to rebase 👍