mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #1552 from cvium/fix_livetv_v2
Disable buffering in HttpClient as it causes big requests to timeout
This commit is contained in:
commit
c5d9480313
@ -284,7 +284,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||||||
|
|
||||||
if (!options.BufferContent)
|
if (!options.BufferContent)
|
||||||
{
|
{
|
||||||
var response = await client.SendAsync(httpWebRequest, options.CancellationToken).ConfigureAwait(false);
|
var response = await client.SendAsync(httpWebRequest, HttpCompletionOption.ResponseHeadersRead, options.CancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);
|
await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);
|
||||||
|
|
||||||
@ -296,12 +296,12 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||||||
Content = stream,
|
Content = stream,
|
||||||
StatusCode = response.StatusCode,
|
StatusCode = response.StatusCode,
|
||||||
ContentType = response.Content.Headers.ContentType?.MediaType,
|
ContentType = response.Content.Headers.ContentType?.MediaType,
|
||||||
ContentLength = stream.Length,
|
ContentLength = response.Content.Headers.ContentLength,
|
||||||
ResponseUrl = response.Content.Headers.ContentLocation?.ToString()
|
ResponseUrl = response.Content.Headers.ContentLocation?.ToString()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var response = await client.SendAsync(httpWebRequest, options.CancellationToken).ConfigureAwait(false))
|
using (var response = await client.SendAsync(httpWebRequest, HttpCompletionOption.ResponseHeadersRead, options.CancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);
|
await EnsureSuccessStatusCode(response, options).ConfigureAwait(false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user