aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/PlayTo/SsdpHttpClient.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-01 07:51:06 -0600
committercrobibero <cody@robibe.ro>2020-09-01 07:51:06 -0600
commit4038d15c83da055add3cc78df46969f82ee66d1b (patch)
tree00c80a2509fc2a5fb476e170ca408763c390ddc9 /Emby.Dlna/PlayTo/SsdpHttpClient.cs
parent8d592777c4585058945a9a52d159346384445892 (diff)
Properly migrate all HttpCompletionOption
Diffstat (limited to 'Emby.Dlna/PlayTo/SsdpHttpClient.cs')
-rw-r--r--Emby.Dlna/PlayTo/SsdpHttpClient.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Dlna/PlayTo/SsdpHttpClient.cs b/Emby.Dlna/PlayTo/SsdpHttpClient.cs
index c6e9e074f..65f1aab22 100644
--- a/Emby.Dlna/PlayTo/SsdpHttpClient.cs
+++ b/Emby.Dlna/PlayTo/SsdpHttpClient.cs
@@ -84,7 +84,7 @@ namespace Emby.Dlna.PlayTo
options.Headers.TryAddWithoutValidation("TIMEOUT", "Second-" + timeOut.ToString(_usCulture));
using var response = await _httpClientFactory.CreateClient(NamedClient.Default)
- .SendAsync(options)
+ .SendAsync(options, HttpCompletionOption.ResponseHeadersRead)
.ConfigureAwait(false);
}
@@ -93,7 +93,7 @@ namespace Emby.Dlna.PlayTo
using var options = new HttpRequestMessage(HttpMethod.Get, url);
options.Headers.UserAgent.Add(ProductInfoHeaderValue.Parse(USERAGENT));
options.Headers.TryAddWithoutValidation("FriendlyName.DLNA.ORG", FriendlyName);
- using var response = await _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, cancellationToken).ConfigureAwait(false);
+ using var response = await _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
using var reader = new StreamReader(stream, Encoding.UTF8);
return XDocument.Parse(
@@ -126,7 +126,7 @@ namespace Emby.Dlna.PlayTo
options.Content = new StringContent(postData, Encoding.UTF8, MediaTypeNames.Text.Xml);
- return _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, cancellationToken);
+ return _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
}
}
}