mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-19 17:48:03 +00:00
Fix null reference when request content type is application/x-www-form-urlencoded
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user