diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-07-07 18:04:06 +0200 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2019-07-13 17:12:06 -0400 |
| commit | b1bd0627098e67169b9ceaa318a32f4d2a9fba30 (patch) | |
| tree | 5e0e6c81be047ef048a7621f69223158d0c4e09c /Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs | |
| parent | 4f17ed961e2756e0c65b1bb0246e7f62a5f44a8a (diff) | |
Properly set content type
Diffstat (limited to 'Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index ae62f34e0..681859f69 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -301,23 +301,15 @@ namespace Emby.Server.Implementations.HttpClientManager } else if (options.RequestContent != null) { - httpWebRequest.Content = new StringContent(options.RequestContent); + httpWebRequest.Content = new StringContent( + options.RequestContent, + null, + options.RequestContentType); } else { httpWebRequest.Content = new ByteArrayContent(Array.Empty<byte>()); } - - // TODO: add correct content type - /* - var contentType = options.RequestContentType ?? "application/x-www-form-urlencoded"; - - if (options.AppendCharsetToMimeType) - { - contentType = contentType.TrimEnd(';') + "; charset=\"utf-8\""; - } - - httpWebRequest.Headers.Add(HeaderNames.ContentType, contentType);*/ } if (options.LogRequest) |
