Workaround automatic Http2 upgrade in POSTs (#1571)

This commit is contained in:
BrennanConroy 2018-03-09 11:43:59 -08:00 committed by GitHub
parent 4a4efe0f39
commit d941a4be09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -299,6 +299,8 @@ namespace Microsoft.AspNetCore.Sockets.Client
using (var request = new HttpRequestMessage(HttpMethod.Post, urlBuilder.Uri))
{
// Corefx changed the default version and High Sierra curlhandler tries to upgrade request
request.Version = new Version(1, 1);
SendUtils.PrepareHttpRequest(request, _httpOptions);
using (var response = await httpClient.SendAsync(request))

View File

@ -39,6 +39,8 @@ namespace Microsoft.AspNetCore.Sockets.Client
// Send them in a single post
var request = new HttpRequestMessage(HttpMethod.Post, sendUrl);
// Corefx changed the default version and High Sierra curlhandler tries to upgrade request
request.Version = new Version(1, 1);
PrepareHttpRequest(request, httpOptions);
request.Content = new ReadOnlySequenceContent(buffer);