diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-05 00:36:45 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-05 00:36:45 -0400 |
| commit | ac69327f1fa866c20630d9d0e0c663472b726c79 (patch) | |
| tree | 3d7dfd7627d13201cc74bcd1f0302b67bf6c16b2 /MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | |
| parent | 8aadbf35136874ac7a279f8bc0f3a4a02a131313 (diff) | |
check in open subtitles stub
Diffstat (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs | 7 |
1 files changed, 4 insertions, 3 deletions
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; |
