mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 14:33:06 +03:00
update xmltv parsing
This commit is contained in:
@@ -458,15 +458,22 @@ namespace Emby.Common.Implementations.HttpClientManager
|
||||
!string.IsNullOrEmpty(options.RequestContent) ||
|
||||
string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var bytes = options.RequestContentBytes ??
|
||||
Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty);
|
||||
try
|
||||
{
|
||||
var bytes = options.RequestContentBytes ??
|
||||
Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty);
|
||||
|
||||
httpWebRequest.ContentType = options.RequestContentType ?? "application/x-www-form-urlencoded";
|
||||
httpWebRequest.ContentType = options.RequestContentType ?? "application/x-www-form-urlencoded";
|
||||
|
||||
#if NET46
|
||||
httpWebRequest.ContentLength = bytes.Length;
|
||||
#endif
|
||||
(await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false)).Write(bytes, 0, bytes.Length);
|
||||
httpWebRequest.ContentLength = bytes.Length;
|
||||
#endif
|
||||
(await httpWebRequest.GetRequestStreamAsync().ConfigureAwait(false)).Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new HttpException(ex.Message) { IsTimedOut = true };
|
||||
}
|
||||
}
|
||||
|
||||
if (options.ResourcePool != null)
|
||||
|
||||
Reference in New Issue
Block a user