aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpListenerHost.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 6b4f2bced..033ffd4c0 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -116,8 +116,7 @@ namespace Emby.Server.Implementations.HttpServer
public Type GetServiceTypeByRequest(Type requestType)
{
- Type serviceType;
- ServiceOperationsMap.TryGetValue(requestType, out serviceType);
+ ServiceOperationsMap.TryGetValue(requestType, out var serviceType);
return serviceType;
}
@@ -199,13 +198,13 @@ namespace Emby.Server.Implementations.HttpServer
{
switch (ex)
{
- case ArgumentException _: return 400;
- case SecurityException _: return 401;
+ case ArgumentException _: return 400;
+ case SecurityException _: return 401;
case DirectoryNotFoundException _:
case FileNotFoundException _:
- case ResourceNotFoundException _: return 404;
+ case ResourceNotFoundException _: return 404;
case RemoteServiceUnavailableException _: return 502;
- default: return 500;
+ default: return 500;
}
}
@@ -673,8 +672,7 @@ namespace Emby.Server.Implementations.HttpServer
return null;
}
- string contentType;
- var restPath = ServiceHandler.FindMatchingRestPath(httpReq.HttpMethod, pathInfo, out contentType);
+ var restPath = ServiceHandler.FindMatchingRestPath(httpReq.HttpMethod, pathInfo, out string contentType);
if (restPath != null)
{