|
|
|
@ -112,12 +112,15 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
/// </summary>
|
|
|
|
|
private IHasHeaders GetHttpResult(IRequest requestContext, byte[] content, string contentType, bool addCachePrevention, IDictionary<string, string> responseHeaders = null)
|
|
|
|
|
{
|
|
|
|
|
IHasHeaders result;
|
|
|
|
|
|
|
|
|
|
var compressionType = requestContext == null ? null : GetCompressionType(requestContext, content, contentType);
|
|
|
|
|
string compressionType = null;
|
|
|
|
|
bool isHeadRequest = false;
|
|
|
|
|
|
|
|
|
|
var isHeadRequest = string.Equals(requestContext.Verb, "head", StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
if (requestContext != null) {
|
|
|
|
|
compressionType = GetCompressionType(requestContext, content, contentType);
|
|
|
|
|
isHeadRequest = string.Equals(requestContext.Verb, "head", StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IHasHeaders result;
|
|
|
|
|
if (string.IsNullOrEmpty(compressionType))
|
|
|
|
|
{
|
|
|
|
|
var contentLength = content.Length;
|
|
|
|
@ -791,4 +794,4 @@ namespace Emby.Server.Implementations.HttpServer
|
|
|
|
|
{
|
|
|
|
|
byte[] Compress(byte[] content);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|