separate encoding from content type values

This commit is contained in:
Luke Pulverenti
2017-10-22 19:27:09 -04:00
parent 4fb4a87ca0
commit c2361db772
6 changed files with 56 additions and 11 deletions
+14 -4
View File
@@ -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);