From ac69327f1fa866c20630d9d0e0c663472b726c79 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 5 May 2014 00:36:45 -0400 Subject: check in open subtitles stub --- .../HttpClientManager/HttpClientManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs') diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs index 69533ef9d..a88f457c5 100644 --- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs +++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs @@ -230,10 +230,11 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager var httpWebRequest = GetRequest(options, httpMethod, options.EnableHttpCompression); - if (!string.IsNullOrEmpty(options.RequestContent) || string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase)) + if (options.RequestContentBytes != null || + !string.IsNullOrEmpty(options.RequestContent) || + string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase)) { - var content = options.RequestContent ?? string.Empty; - var bytes = Encoding.UTF8.GetBytes(content); + var bytes = options.RequestContentBytes ?? Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty); httpWebRequest.ContentType = options.RequestContentType ?? "application/x-www-form-urlencoded"; httpWebRequest.ContentLength = bytes.Length; -- cgit v1.2.3