diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-03-24 13:25:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-24 13:25:41 +0100 |
| commit | e971b62dab21d330fe1d6fae660864895caf8b58 (patch) | |
| tree | 2d88f6f4807b09ec07c3aac5dc6d81ca6a75dc94 /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | 0e787f4e9fb9f4a7159ca75bcd319c7f908df9a3 (diff) | |
| parent | 4cd8903abc1e0c19d717e2930382c37836706e88 (diff) | |
Merge pull request #1137 from thornbill/fix-expires-header
Fix default value for Expires header
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 463265862..134f3c841 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -100,7 +100,7 @@ namespace Emby.Server.Implementations.HttpServer if (addCachePrevention && !responseHeaders.TryGetValue(HeaderNames.Expires, out string expires)) { - responseHeaders[HeaderNames.Expires] = "-1"; + responseHeaders[HeaderNames.Expires] = "0"; } AddResponseHeaders(result, responseHeaders); @@ -146,7 +146,7 @@ namespace Emby.Server.Implementations.HttpServer if (addCachePrevention && !responseHeaders.TryGetValue(HeaderNames.Expires, out string _)) { - responseHeaders[HeaderNames.Expires] = "-1"; + responseHeaders[HeaderNames.Expires] = "0"; } AddResponseHeaders(result, responseHeaders); @@ -190,7 +190,7 @@ namespace Emby.Server.Implementations.HttpServer if (addCachePrevention && !responseHeaders.TryGetValue(HeaderNames.Expires, out string _)) { - responseHeaders[HeaderNames.Expires] = "-1"; + responseHeaders[HeaderNames.Expires] = "0"; } AddResponseHeaders(result, responseHeaders); @@ -215,7 +215,7 @@ namespace Emby.Server.Implementations.HttpServer responseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); } - responseHeaders[HeaderNames.Expires] = "-1"; + responseHeaders[HeaderNames.Expires] = "0"; return ToOptimizedResultInternal(requestContext, result, responseHeaders); } |
