aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services/ResponseHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Services/ResponseHelper.cs')
-rw-r--r--Emby.Server.Implementations/Services/ResponseHelper.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Services/ResponseHelper.cs b/Emby.Server.Implementations/Services/ResponseHelper.cs
index a566b18dd..3f1672e94 100644
--- a/Emby.Server.Implementations/Services/ResponseHelper.cs
+++ b/Emby.Server.Implementations/Services/ResponseHelper.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Globalization;
using System.IO;
@@ -43,8 +45,7 @@ namespace Emby.Server.Implementations.Services
response.StatusCode = httpResult.Status;
}
- var responseOptions = result as IHasHeaders;
- if (responseOptions != null)
+ if (result is IHasHeaders responseOptions)
{
foreach (var responseHeaders in responseOptions.Headers)
{
@@ -58,8 +59,8 @@ namespace Emby.Server.Implementations.Services
}
}
- //ContentType='text/html' is the default for a HttpResponse
- //Do not override if another has been set
+ // ContentType='text/html' is the default for a HttpResponse
+ // Do not override if another has been set
if (response.ContentType == null || response.ContentType == "text/html")
{
response.ContentType = defaultContentType;