Skip to content

Fix: Handle multiple 1xx responses#8569

Merged
yschimke merged 1 commit intosquare:masterfrom
yschimke:allow_multiple_10x
Nov 5, 2024
Merged

Fix: Handle multiple 1xx responses#8569
yschimke merged 1 commit intosquare:masterfrom
yschimke:allow_multiple_10x

Conversation

@yschimke
Copy link
Copy Markdown
Collaborator

@yschimke yschimke commented Nov 4, 2024

This change updates the client to handle multiple 1xx (Processing etc) responses from the server. The client now waits for the final response with a status code other than 1xx before proceeding.

From https://datatracker.ietf.org/doc/html/rfc7231#section-6.2

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.

fixes #8568

This change updates the client to handle multiple 10x (Processing etc) responses from the server. The client now waits for the final response with a status code other than 10x before proceeding.

#fixes 8568
@yschimke
Copy link
Copy Markdown
Collaborator Author

yschimke commented Nov 4, 2024

cc @reschke

@yschimke yschimke changed the title Fix: Handle multiple 10x responses Fix: Handle multiple 1xx responses Nov 4, 2024
@reschke
Copy link
Copy Markdown
Contributor

reschke commented Nov 5, 2024

LGTM; make sure it's 1xx, not 10x though.

@yschimke yschimke merged commit f1e6d01 into square:master Nov 5, 2024
yschimke added a commit to yschimke/okhttp that referenced this pull request May 5, 2025
This change updates the client to handle multiple 1xx (Processing etc) responses from the server. The client now waits for the final response with a status code other than 1xx before proceeding.

From https://datatracker.ietf.org/doc/html/rfc7231#section-6.2

>    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.

fixes square#8568

(cherry picked from commit f1e6d01)
@yschimke yschimke deleted the allow_multiple_10x branch August 2, 2025 19:09
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.

incorrect treatment of multiple informational HTTP responses

3 participants