Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Conversation

@baulig
Copy link

@baulig baulig commented Jun 5, 2019

Backport of dotnet#38129.

  • HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

(cherry picked from commit 73e610f)

The description of the upstream PR mentions "HEAD and PUT request" - this was my original approach, which was discussed during code review and then changed into only doing it for HEAD. Thanks a lot to @kg for pointing this out.

…HEAD or PUT request. (dotnet#38129)

* HttpClient.SendAsync() should not attempt to read response body on a HEAD or PUT request.

* Update HttpMethod.cs

* Address feedback.

* Cleanup.

* Update HttpRequestMessageTest.cs

(cherry picked from commit 73e610f)
@baulig baulig requested review from marek-safar and steveisok June 5, 2019 17:54
@baulig baulig self-assigned this Jun 5, 2019
Copy link
Member

@kg kg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description says HEAD or PUT but the code only seems to check for HEAD. I'm fine with it being as-is but I want to make sure they match since the description of the PR sounds like what we actually want...

@baulig baulig changed the title HttpClient.SendAsync() should not attempt to read response body on a HEAD or PUT request. HttpClient.SendAsync() should not attempt to read response body on a HEAD request. Jun 5, 2019
@baulig baulig merged commit 1274dde into mono:master Jun 5, 2019
@baulig baulig deleted the work-backport-38129 branch June 5, 2019 18:03
@akoeplinger
Copy link
Member

@monojenkins backport to mono-2019-02

baulig pushed a commit to baulig/mono that referenced this pull request Jun 5, 2019
HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

* CoreFX PR dotnet/corefx#38129.

* Backported in mono/corefx#297.

* Fixes mono#14214.
steveisok pushed a commit to mono/mono that referenced this pull request Jun 6, 2019
HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

* CoreFX PR dotnet/corefx#38129.

* Backported in mono/corefx#297.

* Fixes #14214.
monojenkins pushed a commit to monojenkins/mono that referenced this pull request Jun 6, 2019
HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

* CoreFX PR dotnet/corefx#38129.

* Backported in mono/corefx#297.

* Fixes mono#14214.
baulig pushed a commit to baulig/mono that referenced this pull request Jun 6, 2019
HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

* CoreFX PR dotnet/corefx#38129.

* Backported in mono/corefx#297.

* Fixes mono#14214.

(cherry picked from commit 2b3a23c)
marek-safar pushed a commit to mono/mono that referenced this pull request Jun 6, 2019
HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

* CoreFX PR dotnet/corefx#38129.

* Backported in mono/corefx#297.

* Fixes #14214.

(cherry picked from commit 2b3a23c)
marek-safar pushed a commit to mono/mono that referenced this pull request Jun 6, 2019
HttpClient.SendAsync() should not attempt to read response body on a HEAD request.

* CoreFX PR dotnet/corefx#38129.

* Backported in mono/corefx#297.

* Fixes #14214.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants