|
@@ -20,8 +20,6 @@ namespace Emby.Server.Implementations.Services
|
|
{
|
|
{
|
|
response.StatusCode = (int)HttpStatusCode.NoContent;
|
|
response.StatusCode = (int)HttpStatusCode.NoContent;
|
|
}
|
|
}
|
|
-
|
|
|
|
- response.SetContentLength(0);
|
|
|
|
return Task.CompletedTask;
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -55,7 +53,6 @@ namespace Emby.Server.Implementations.Services
|
|
{
|
|
{
|
|
if (string.Equals(responseHeaders.Key, "Content-Length", StringComparison.OrdinalIgnoreCase))
|
|
if (string.Equals(responseHeaders.Key, "Content-Length", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
{
|
|
- response.SetContentLength(long.Parse(responseHeaders.Value));
|
|
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -104,7 +101,6 @@ namespace Emby.Server.Implementations.Services
|
|
if (bytes != null)
|
|
if (bytes != null)
|
|
{
|
|
{
|
|
response.ContentType = "application/octet-stream";
|
|
response.ContentType = "application/octet-stream";
|
|
- response.SetContentLength(bytes.Length);
|
|
|
|
|
|
|
|
if (bytes.Length > 0)
|
|
if (bytes.Length > 0)
|
|
{
|
|
{
|
|
@@ -117,7 +113,6 @@ namespace Emby.Server.Implementations.Services
|
|
if (responseText != null)
|
|
if (responseText != null)
|
|
{
|
|
{
|
|
bytes = Encoding.UTF8.GetBytes(responseText);
|
|
bytes = Encoding.UTF8.GetBytes(responseText);
|
|
- response.SetContentLength(bytes.Length);
|
|
|
|
if (bytes.Length > 0)
|
|
if (bytes.Length > 0)
|
|
{
|
|
{
|
|
return response.OutputStream.WriteAsync(bytes, 0, bytes.Length, cancellationToken);
|
|
return response.OutputStream.WriteAsync(bytes, 0, bytes.Length, cancellationToken);
|
|
@@ -149,8 +144,6 @@ namespace Emby.Server.Implementations.Services
|
|
|
|
|
|
var contentLength = ms.Length;
|
|
var contentLength = ms.Length;
|
|
|
|
|
|
- response.SetContentLength(contentLength);
|
|
|
|
-
|
|
|
|
if (contentLength > 0)
|
|
if (contentLength > 0)
|
|
{
|
|
{
|
|
await ms.CopyToAsync(response.OutputStream).ConfigureAwait(false);
|
|
await ms.CopyToAsync(response.OutputStream).ConfigureAwait(false);
|