diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-22 19:27:09 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-10-22 19:27:09 -0400 |
| commit | c2361db772591e176fcf2ded2e3b1725cf1c5dd7 (patch) | |
| tree | 8dd114ae95ff2a800902c76a01c519a499bf59e1 /Emby.Dlna | |
| parent | 4fb4a87ca0d2730a8dee20ceb09f31e01ff6d5cf (diff) | |
separate encoding from content type values
Diffstat (limited to 'Emby.Dlna')
| -rw-r--r-- | Emby.Dlna/ContentDirectory/ContentDirectoryBrowser.cs | 2 | ||||
| -rw-r--r-- | Emby.Dlna/PlayTo/SsdpHttpClient.cs | 18 |
2 files changed, 15 insertions, 5 deletions
diff --git a/Emby.Dlna/ContentDirectory/ContentDirectoryBrowser.cs b/Emby.Dlna/ContentDirectory/ContentDirectoryBrowser.cs index 9c5c5fb64f..61501635fa 100644 --- a/Emby.Dlna/ContentDirectory/ContentDirectoryBrowser.cs +++ b/Emby.Dlna/ContentDirectory/ContentDirectoryBrowser.cs @@ -33,7 +33,7 @@ namespace Emby.Dlna.ContentDirectory { CancellationToken = cancellationToken, UserAgent = "Emby", - RequestContentType = "text/xml; charset=\"utf-8\"", + RequestContentType = "text/xml", LogErrorResponseBody = true, Url = request.ContentDirectoryUrl, BufferContent = false diff --git a/Emby.Dlna/PlayTo/SsdpHttpClient.cs b/Emby.Dlna/PlayTo/SsdpHttpClient.cs index 6c66a999c8..40fe010a23 100644 --- a/Emby.Dlna/PlayTo/SsdpHttpClient.cs +++ b/Emby.Dlna/PlayTo/SsdpHttpClient.cs @@ -72,7 +72,10 @@ namespace Emby.Dlna.PlayTo Url = url, UserAgent = USERAGENT, LogErrorResponseBody = true, - BufferContent = false + BufferContent = false, + + // The periodic requests may keep some devices awake + LogRequestAsDebug = true }; options.RequestHeaders["HOST"] = ip + ":" + port.ToString(_usCulture); @@ -93,7 +96,10 @@ namespace Emby.Dlna.PlayTo Url = url, UserAgent = USERAGENT, LogErrorResponseBody = true, - BufferContent = false + BufferContent = false, + + // The periodic requests may keep some devices awake + LogRequestAsDebug = true }; options.RequestHeaders["FriendlyName.DLNA.ORG"] = FriendlyName; @@ -125,7 +131,10 @@ namespace Emby.Dlna.PlayTo UserAgent = USERAGENT, LogRequest = logRequest || _config.GetDlnaConfiguration().EnableDebugLog, LogErrorResponseBody = true, - BufferContent = false + BufferContent = false, + + // The periodic requests may keep some devices awake + LogRequestAsDebug = true }; options.RequestHeaders["SOAPAction"] = soapAction; @@ -137,7 +146,8 @@ namespace Emby.Dlna.PlayTo options.RequestHeaders["contentFeatures.dlna.org"] = header; } - options.RequestContentType = "text/xml; charset=\"utf-8\""; + options.RequestContentType = "text/xml"; + options.RequestContentEncoding = Encoding.UTF8; options.RequestContent = postData; return _httpClient.Post(options); |
