refined app themes

This commit is contained in:
Luke Pulverenti
2014-02-28 00:22:36 -05:00
parent c177de9407
commit fb51f1e6f0
5 changed files with 46 additions and 29 deletions

View File

@@ -238,8 +238,19 @@ namespace MediaBrowser.Server.Implementations.HttpServer
return hasOptions;
}
// Otherwise wrap into an HttpResult
var httpResult = new HttpResult(result, contentType ?? "text/html", HttpStatusCode.NotModified);
IHasOptions httpResult;
var stream = result as Stream;
if (stream != null)
{
httpResult = new StreamWriter(stream, contentType, _logger);
}
else
{
// Otherwise wrap into an HttpResult
httpResult = new HttpResult(result, contentType ?? "text/html", HttpStatusCode.NotModified);
}
AddResponseHeaders(httpResult, responseHeaders);
@@ -478,7 +489,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
if (!SupportsCompression)
{
responseHeaders["Content-Length"] = originalContentLength.ToString(UsCulture);
if (isHeadRequest)
{
return GetHttpResult(new byte[] { }, contentType);
@@ -495,7 +506,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{
return GetHttpResult(new byte[] { }, contentType);
}
return new CompressedResult(contents, requestedCompressionType, contentType);
}