Address comments
This commit is contained in:
parent
ea446fd4a3
commit
3f13851be5
|
@ -277,7 +277,8 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
|
||||
private object ToOptimizedResultInternal<T>(IRequest request, T dto, IDictionary<string, string> responseHeaders = null)
|
||||
{
|
||||
var contentType = request.ResponseContentType?.Split(';')[0];
|
||||
// TODO: @bond use Span and .Equals
|
||||
var contentType = request.ResponseContentType?.Split(';')[0].Trim().ToLowerInvariant();
|
||||
|
||||
switch (contentType)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<AssemblyName>jellyfin</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -194,8 +194,8 @@ namespace Jellyfin.Server.SocketSharp
|
|||
{
|
||||
// TODO: @bond move to Span when Span.Split lands
|
||||
// https://github.com/dotnet/corefx/issues/26528
|
||||
var contentType = acceptsType?.Split(';')[0];
|
||||
acceptsAnything = contentType.IndexOf("*/*", StringComparison.Ordinal) != -1;
|
||||
var contentType = acceptsType?.Split(';')[0].Trim();
|
||||
acceptsAnything = contentType.Equals("*/*", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (acceptsAnything)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user