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

[4.x] Add test for 103 handling #8055

Merged
merged 5 commits into from Oct 17, 2023
Merged

Conversation

yschimke
Copy link
Collaborator

No description provided.

@yschimke yschimke changed the base branch from master to okhttp_4x October 15, 2023 11:44
@@ -347,6 +349,10 @@ class MockResponse : Cloneable {

override fun toString() = status

fun addInformationalResponseInternal(informationalResponse: MockResponse): MockResponse = apply {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not great, but seems better to have some limited support without the bigger change of backporting.

cc @swankjesse

.post(RequestBody.create("abc", MediaType.get("text/plain")))
.build();
executeSynchronously(request)
.assertFailure(SocketTimeoutException.class);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Showing we don't handle this well.

cc @swankjesse

Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

@@ -1026,6 +1026,13 @@ class MockWebServer : ExternalResource(), Closeable {
readBody = true
}

peek.informationalResponses.forEach {
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, I dislike forEach as an alternative to for(...). It’s needlessly complex to step-debug!

@swankjesse swankjesse merged commit ea720d3 into square:okhttp_4x Oct 17, 2023
14 checks passed
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.

None yet

2 participants