aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-03-23 00:04:36 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-03-23 00:04:36 -0400
commitb20151fff373100da7946df93afb7dd4dccea3e4 (patch)
treea16d7085c0eab807c309c94461ed60821029f1ff /MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs
parent4bc27f3a65ddbffcc7b74683df72503f20df275c (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.cs11
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");
+ }
});
}