aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services/ResponseHelper.cs
diff options
context:
space:
mode:
authorredSpoutnik <15638041+redSpoutnik@users.noreply.github.com>2019-03-16 17:54:57 +0100
committerGitHub <noreply@github.com>2019-03-16 17:54:57 +0100
commit480a6607e2badad925216e715841cce6300ef98e (patch)
tree01e09eb894f973f4519342dc6df502e3f1f2799f /Emby.Server.Implementations/Services/ResponseHelper.cs
parent4a30fee40df69be381c2cdea01cd4dd29b97ad3c (diff)
parent3d1d27230de88cbf5c3ed3f882399175661c1c94 (diff)
Merge branch 'master' into subtitle-display-title
Diffstat (limited to 'Emby.Server.Implementations/Services/ResponseHelper.cs')
-rw-r--r--Emby.Server.Implementations/Services/ResponseHelper.cs7
1 files changed, 0 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Services/ResponseHelper.cs b/Emby.Server.Implementations/Services/ResponseHelper.cs
index dc99753477..0301ff335f 100644
--- a/Emby.Server.Implementations/Services/ResponseHelper.cs
+++ b/Emby.Server.Implementations/Services/ResponseHelper.cs
@@ -20,8 +20,6 @@ namespace Emby.Server.Implementations.Services
{
response.StatusCode = (int)HttpStatusCode.NoContent;
}
-
- response.SetContentLength(0);
return Task.CompletedTask;
}
@@ -55,7 +53,6 @@ namespace Emby.Server.Implementations.Services
{
if (string.Equals(responseHeaders.Key, "Content-Length", StringComparison.OrdinalIgnoreCase))
{
- response.SetContentLength(long.Parse(responseHeaders.Value));
continue;
}
@@ -104,7 +101,6 @@ namespace Emby.Server.Implementations.Services
if (bytes != null)
{
response.ContentType = "application/octet-stream";
- response.SetContentLength(bytes.Length);
if (bytes.Length > 0)
{
@@ -117,7 +113,6 @@ namespace Emby.Server.Implementations.Services
if (responseText != null)
{
bytes = Encoding.UTF8.GetBytes(responseText);
- response.SetContentLength(bytes.Length);
if (bytes.Length > 0)
{
return response.OutputStream.WriteAsync(bytes, 0, bytes.Length, cancellationToken);
@@ -149,8 +144,6 @@ namespace Emby.Server.Implementations.Services
var contentLength = ms.Length;
- response.SetContentLength(contentLength);
-
if (contentLength > 0)
{
await ms.CopyToAsync(response.OutputStream).ConfigureAwait(false);