Merge branch 'master' into userdb-efcore

# Conflicts:
#	Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs
#	Emby.Server.Implementations/Library/UserManager.cs
#	Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs
#	Emby.Server.Implementations/Sorting/IsPlayedComparer.cs
#	Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs
#	Emby.Server.Implementations/TV/TVSeriesManager.cs
#	Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs
This commit is contained in:
Patrick Barron
2020-06-04 16:39:50 -04:00
334 changed files with 2011 additions and 1689 deletions

View File

@@ -56,6 +56,7 @@ namespace Emby.Server.Implementations.HttpServer
/// <summary>
/// Gets the result.
/// </summary>
/// <param name="requestContext">The request context.</param>
/// <param name="content">The content.</param>
/// <param name="contentType">Type of the content.</param>
/// <param name="responseHeaders">The response headers.</param>
@@ -255,16 +256,20 @@ namespace Emby.Server.Implementations.HttpServer
{
var acceptEncoding = request.Headers[HeaderNames.AcceptEncoding].ToString();
if (string.IsNullOrEmpty(acceptEncoding))
if (!string.IsNullOrEmpty(acceptEncoding))
{
//if (_brotliCompressor != null && acceptEncoding.IndexOf("br", StringComparison.OrdinalIgnoreCase) != -1)
// if (_brotliCompressor != null && acceptEncoding.IndexOf("br", StringComparison.OrdinalIgnoreCase) != -1)
// return "br";
if (acceptEncoding.IndexOf("deflate", StringComparison.OrdinalIgnoreCase) != -1)
if (acceptEncoding.Contains("deflate", StringComparison.OrdinalIgnoreCase))
{
return "deflate";
}
if (acceptEncoding.IndexOf("gzip", StringComparison.OrdinalIgnoreCase) != -1)
if (acceptEncoding.Contains("gzip", StringComparison.OrdinalIgnoreCase))
{
return "gzip";
}
}
return null;