mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-25 11:34:43 +01:00
Fixes issues with HttpClientManager
This commit is contained in:
@@ -71,7 +71,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
UserAgent = "Emby/3.0",
|
||||
|
||||
// Shouldn't matter but may cause issues
|
||||
EnableHttpCompression = false
|
||||
DecompressionMethod = CompressionMethod.None
|
||||
};
|
||||
|
||||
using (var response = await _httpClient.SendAsync(httpRequestOptions, "GET").ConfigureAwait(false))
|
||||
|
||||
@@ -627,15 +627,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
ListingsProviderInfo providerInfo)
|
||||
{
|
||||
// Schedules direct requires that the client support compression and will return a 400 response without it
|
||||
options.EnableHttpCompression = true;
|
||||
|
||||
// On windows 7 under .net core, this header is not getting added
|
||||
#if NETSTANDARD2_0
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
{
|
||||
options.RequestHeaders[HeaderNames.AcceptEncoding] = "deflate";
|
||||
}
|
||||
#endif
|
||||
options.DecompressionMethod = CompressionMethod.Deflate;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -665,15 +657,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
ListingsProviderInfo providerInfo)
|
||||
{
|
||||
// Schedules direct requires that the client support compression and will return a 400 response without it
|
||||
options.EnableHttpCompression = true;
|
||||
|
||||
// On windows 7 under .net core, this header is not getting added
|
||||
#if NETSTANDARD2_0
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
{
|
||||
options.RequestHeaders[HeaderNames.AcceptEncoding] = "deflate";
|
||||
}
|
||||
#endif
|
||||
options.DecompressionMethod = CompressionMethod.Deflate;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -73,11 +73,9 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
CancellationToken = cancellationToken,
|
||||
Url = path,
|
||||
Progress = new SimpleProgress<double>(),
|
||||
DecompressionMethod = CompressionMethod.Gzip,
|
||||
|
||||
// It's going to come back gzipped regardless of this value
|
||||
// So we need to make sure the decompression method is set to gzip
|
||||
EnableHttpCompression = true,
|
||||
DecompressionMethod = CompressionMethod.Gzip,
|
||||
|
||||
UserAgent = "Emby/3.0"
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||
CancellationToken = CancellationToken.None,
|
||||
BufferContent = false,
|
||||
|
||||
EnableHttpCompression = false,
|
||||
DecompressionMethod = CompressionMethod.None,
|
||||
};
|
||||
|
||||
foreach (var header in mediaSource.RequiredHttpHeaders)
|
||||
|
||||
Reference in New Issue
Block a user