Begin removing System.Net sources

This commit is contained in:
Claus Vium
2019-02-21 10:07:21 +01:00
parent 968e282c90
commit 4db31acff9
54 changed files with 264 additions and 7013 deletions

View File

@@ -324,7 +324,8 @@ namespace MediaBrowser.Api.Playback.Progressive
// Seeing cases of -1 here
if (response.ContentLength.HasValue && response.ContentLength.Value >= 0)
{
responseHeaders["Content-Length"] = response.ContentLength.Value.ToString(UsCulture);
// TODO
//responseHeaders["Content-Length"] = response.ContentLength.Value.ToString(UsCulture);
}
if (isHeadRequest)
@@ -382,17 +383,18 @@ namespace MediaBrowser.Api.Playback.Progressive
var hasHeaders = streamResult as IHasHeaders;
if (hasHeaders != null)
{
if (contentLength.HasValue)
{
hasHeaders.Headers["Content-Length"] = contentLength.Value.ToString(CultureInfo.InvariantCulture);
}
else
{
// TODO
//if (contentLength.HasValue)
//{
// hasHeaders.Headers["Content-Length"] = contentLength.Value.ToString(CultureInfo.InvariantCulture);
//}
//else
//{
if (hasHeaders.Headers.ContainsKey("Content-Length"))
{
hasHeaders.Headers.Remove("Content-Length");
}
}
//}
}
return streamResult;