mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-14 10:33:43 +02:00
Fix null reference when request content type is application/x-www-form-urlencoded
This commit is contained in:
parent
a8da122fb3
commit
08d3a5d2fe
1 changed files with 4 additions and 1 deletions
|
|
@ -26,7 +26,10 @@ namespace Emby.Server.Implementations.Services
|
|||
if (!string.IsNullOrEmpty(contentType) && httpReq.ContentLength > 0)
|
||||
{
|
||||
var deserializer = RequestHelper.GetRequestReader(host, contentType);
|
||||
return deserializer?.Invoke(requestType, httpReq.InputStream);
|
||||
if (deserializer != null)
|
||||
{
|
||||
return deserializer.Invoke(requestType, httpReq.InputStream);
|
||||
}
|
||||
}
|
||||
|
||||
return Task.FromResult(host.CreateInstance(requestType));
|
||||
|
|
|
|||
Loading…
Reference in a new issue