diff options
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index b3c7ecc9f..e210e2224 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -653,6 +653,14 @@ namespace Emby.Server.Implementations.LiveTv.Listings // 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["Accept-Encoding"] = "deflate"; + } +#endif + try { return await _httpClient.Post(options).ConfigureAwait(false); @@ -684,6 +692,14 @@ namespace Emby.Server.Implementations.LiveTv.Listings // 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["Accept-Encoding"] = "deflate"; + } +#endif + try { return await _httpClient.SendAsync(options, "GET").ConfigureAwait(false); |
