Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support informational responses with HTTP/1.1 #581

Merged
merged 5 commits into from Nov 1, 2022

Conversation

tomchristie
Copy link
Member

Prompted by #572 (comment)

@tomchristie tomchristie added the bug Something isn't working label Sep 29, 2022
@A5rocks
Copy link

A5rocks commented Sep 29, 2022

Thank you! Just a quick question: should 1xx responses on non-streaming requests return? With this PR they do but I'm not sure that's intentional. (I think they should definitely return for streaming requests, though)

Here's the bit in specific I'm not sure about:

A client MUST be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one. A user agent MAY ignore unexpected 1xx responses.

source

@tomchristie tomchristie changed the title Support information responses with HTTP/1.1 Support informational responses with HTTP/1.1 Sep 29, 2022
@tomchristie
Copy link
Member Author

Just a quick question: should 1xx responses on non-streaming requests return?

Yes, I think that's okay. You'll end up with a 101 response, with body that'll stream the network content.

At the httpx layer that'd typically effectively mean you'd get a 101 response, that'd then result in a read timeout waiting for some response content.

But you'd need to have sent an upgrade request in the first place, so you'd have to deliberately do odd things, and you'd end up in a reasonable failure state.

@tomchristie tomchristie requested a review from a team October 10, 2022 11:39
@tomchristie tomchristie mentioned this pull request Oct 11, 2022
Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

👍

@tomchristie tomchristie merged commit 6c57627 into master Nov 1, 2022
@tomchristie tomchristie deleted the support-http11-101-upgrade branch November 1, 2022 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants