Skip to content

Conversation

vadz
Copy link
Contributor

@vadz vadz commented Jul 9, 2017

There is no message body for 1xx, 203 and 304 HTTP responses (see
section 3.3.3/1 of RFC 7230), yet we tried to read it nevertheless when
using ASIO backend, resulting in "Failed to read response body"
exception being thrown.

Fix this by explicitly skipping reading the body for these status codes.


This is (or should be, IMO) relatively high priority as it fixes a bug which currently breaks any application receiving 304 responses (which are quite common, of course) under Linux.

There is no message body for 1xx, 203 and 304 HTTP responses (see
section 3.3.3/1 of RFC 7230), yet we tried to read it nevertheless when
using ASIO backend, resulting in "Failed to read response body"
exception being thrown.

Fix this by explicitly skipping reading the body for these status codes.
@msftclas
Copy link

msftclas commented Jul 9, 2017

@vadz,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@ras0219-msft
Copy link
Contributor

Thank you for including the RFC reference, it makes this much easier to review!

@ras0219-msft ras0219-msft merged commit 0a9a84c into microsoft:master Jul 9, 2017
@vadz vadz deleted the fix-no-body-errors branch September 7, 2017 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants