Remove more Content-Length references
This commit is contained in:
parent
913e80fd55
commit
446f9bf81f
|
@ -99,12 +99,10 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
RangeStart = requestedRange.Key;
|
||||
RangeLength = 1 + RangeEnd - RangeStart;
|
||||
|
||||
// Content-Length is the length of what we're serving, not the original content
|
||||
var lengthString = RangeLength.ToString(UsCulture);
|
||||
var rangeString = $"bytes {RangeStart}-{RangeEnd}/{TotalContentLength}";
|
||||
Headers[HeaderNames.ContentRange] = rangeString;
|
||||
|
||||
Logger.LogInformation("Setting range response values for {0}. RangeRequest: {1} Content-Length: {2}, Content-Range: {3}", Path, RangeHeader, lengthString, rangeString);
|
||||
Logger.LogInformation("Setting range response values for {0}. RangeRequest: {1} Content-Range: {2}", Path, RangeHeader, rangeString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -96,7 +96,6 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
RangeStart = requestedRange.Key;
|
||||
RangeLength = 1 + RangeEnd - RangeStart;
|
||||
|
||||
// Content-Length is the length of what we're serving, not the original content
|
||||
Headers[HeaderNames.ContentRange] = $"bytes {RangeStart}-{RangeEnd}/{TotalContentLength}";
|
||||
|
||||
if (RangeStart > 0 && SourceStream.CanSeek)
|
||||
|
|
|
@ -25,16 +25,12 @@ namespace MediaBrowser.Model.Services
|
|||
/// <summary>
|
||||
/// Adds a new query parameter.
|
||||
/// </summary>
|
||||
public virtual void Add(string key, string value)
|
||||
public void Add(string key, string value)
|
||||
{
|
||||
if (string.Equals(key, "content-length", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Add(new NameValuePair(key, value));
|
||||
}
|
||||
|
||||
public virtual void Set(string key, string value)
|
||||
private void Set(string key, string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
|
@ -62,7 +58,7 @@ namespace MediaBrowser.Model.Services
|
|||
Add(key, value);
|
||||
}
|
||||
|
||||
public string Get(string name)
|
||||
private string Get(string name)
|
||||
{
|
||||
var stringComparison = GetStringComparison();
|
||||
|
||||
|
@ -77,7 +73,7 @@ namespace MediaBrowser.Model.Services
|
|||
return null;
|
||||
}
|
||||
|
||||
public virtual List<NameValuePair> GetItems(string name)
|
||||
private List<NameValuePair> GetItems(string name)
|
||||
{
|
||||
var stringComparison = GetStringComparison();
|
||||
|
||||
|
@ -111,20 +107,6 @@ namespace MediaBrowser.Model.Services
|
|||
return list;
|
||||
}
|
||||
|
||||
public Dictionary<string, string> ToDictionary()
|
||||
{
|
||||
var stringComparer = GetStringComparer();
|
||||
|
||||
var headers = new Dictionary<string, string>(stringComparer);
|
||||
|
||||
foreach (var pair in this)
|
||||
{
|
||||
headers[pair.Name] = pair.Value;
|
||||
}
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
public IEnumerable<string> Keys
|
||||
{
|
||||
get
|
||||
|
|
Loading…
Reference in New Issue
Block a user