mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
add ApplicationPath to app paths interface to hide implementation
This commit is contained in:
@@ -99,6 +99,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool SupportsCompression
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optimized result.
|
||||
/// </summary>
|
||||
@@ -116,7 +124,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
throw new ArgumentNullException("result");
|
||||
}
|
||||
|
||||
var optimizedResult = requestContext.ToOptimizedResult(result);
|
||||
var optimizedResult = SupportsCompression ? requestContext.ToOptimizedResult(result) : result;
|
||||
|
||||
if (responseHeaders != null)
|
||||
{
|
||||
@@ -458,6 +466,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
}
|
||||
}
|
||||
|
||||
if (!SupportsCompression)
|
||||
{
|
||||
return new HttpResult(content, contentType);
|
||||
}
|
||||
|
||||
var contents = content.Compress(requestContext.CompressionType);
|
||||
|
||||
return new CompressedResult(contents, requestContext.CompressionType, contentType);
|
||||
|
||||
Reference in New Issue
Block a user