Target net6.0

This commit is contained in:
Bond_009
2021-02-14 15:11:46 +01:00
parent 1ebd3c9ac3
commit 13fbfe6091
56 changed files with 103 additions and 90 deletions

View File

@@ -23,7 +23,7 @@ namespace Jellyfin.Server.Configuration
}
/// <inheritdoc />
public Task<CorsPolicy> GetPolicyAsync(HttpContext context, string policyName)
public Task<CorsPolicy?> GetPolicyAsync(HttpContext context, string? policyName)
{
var corsHosts = _serverConfigurationManager.Configuration.CorsHosts;
var builder = new CorsPolicyBuilder()
@@ -43,7 +43,7 @@ namespace Jellyfin.Server.Configuration
.AllowCredentials();
}
return Task.FromResult(builder.Build());
return Task.FromResult<CorsPolicy?>(builder.Build());
}
}
}

View File

@@ -68,7 +68,7 @@ namespace Jellyfin.Server.Infrastructure
}
/// <inheritdoc />
protected override Task WriteFileAsync(ActionContext context, PhysicalFileResult result, RangeItemHeaderValue range, long rangeLength)
protected override Task WriteFileAsync(ActionContext context, PhysicalFileResult result, RangeItemHeaderValue? range, long rangeLength)
{
if (context == null)
{

View File

@@ -8,7 +8,7 @@
<PropertyGroup>
<AssemblyName>jellyfin</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ServerGarbageCollection>false</ServerGarbageCollection>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

View File

@@ -27,7 +27,11 @@ namespace Jellyfin.Server.Middleware
/// <returns>The async task.</returns>
public async Task Invoke(HttpContext httpContext)
{
httpContext.Features.Set<IQueryFeature>(new UrlDecodeQueryFeature(httpContext.Features.Get<IQueryFeature>()));
var feature = httpContext.Features.Get<IQueryFeature>();
if (feature != null)
{
httpContext.Features.Set<IQueryFeature>(new UrlDecodeQueryFeature(feature));
}
await _next(httpContext).ConfigureAwait(false);
}