diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-23 00:04:36 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-23 00:04:36 -0400 |
| commit | b20151fff373100da7946df93afb7dd4dccea3e4 (patch) | |
| tree | a16d7085c0eab807c309c94461ed60821029f1ff /MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs | |
| parent | 4bc27f3a65ddbffcc7b74683df72503f20df275c (diff) | |
copy dashboard to the output folder and load from the file system, instead of using embedded resources
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs index 0fc2c0dda..79663dca9 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs @@ -162,9 +162,18 @@ namespace MediaBrowser.Server.Implementations.HttpServer if (!string.IsNullOrEmpty(exception.Message)) { - res.AddHeader("X-Application-Error-Code", exception.Message); + res.AddHeader("X-Application-Error-Code", exception.Message.Replace(Environment.NewLine, " ")); } } + + if (dto is CompressedResult) + { + // Per Google PageSpeed + // This instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed. + // The correct version of the resource is delivered based on the client request header. + // This is a good choice for applications that are singly homed and depend on public proxies for user locality. + res.AddHeader("Vary", "Accept-Encoding"); + } }); } |
