mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Made chunked encoding overridable
This commit is contained in:
parent
f9bdf0b6d9
commit
442b9c559f
@ -13,6 +13,22 @@ namespace MediaBrowser.Common.Net.Handlers
|
||||
/// </summary>
|
||||
public IDictionary<string, string> Headers = new Dictionary<string, string>();
|
||||
|
||||
public virtual bool UseChunkedEncoding
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual long? ContentLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true or false indicating if the handler writes to the stream asynchronously.
|
||||
/// If so the subclass will be responsible for disposing the stream when complete.
|
||||
|
@ -58,7 +58,12 @@ namespace MediaBrowser.Common.Net
|
||||
|
||||
if (statusCode == 200)
|
||||
{
|
||||
Response.SendChunked = true;
|
||||
Response.SendChunked = handler.UseChunkedEncoding;
|
||||
|
||||
if (handler.ContentLength.HasValue)
|
||||
{
|
||||
Response.ContentLength64 = handler.ContentLength.Value;
|
||||
}
|
||||
|
||||
if (handler.CompressResponse)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user