mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-26 03:55:01 +01:00
Begin removing System.Net sources
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user