Skip to content

Don't force a response body read on all trailers#8904

Merged
swankjesse merged 1 commit intomasterfrom
jwilson.0703.trailers_explode
Jul 3, 2025
Merged

Don't force a response body read on all trailers#8904
swankjesse merged 1 commit intomasterfrom
jwilson.0703.trailers_explode

Conversation

@swankjesse
Copy link
Copy Markdown
Collaborator

We only need to read the response body if its coming from a real server.

Closes: #8902

We only need to read the response body if its coming
from a real server.

Closes: #8902

override fun contentLength(): Long = -1L

override fun source(): BufferedSource = error("unexpected call")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice test

@swankjesse swankjesse merged commit 8579689 into master Jul 3, 2025
22 checks passed
@swankjesse swankjesse deleted the jwilson.0703.trailers_explode branch July 3, 2025 22:30
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.

Crash reading trailers in Retrofit Call

2 participants