Skip to content

Don't buffer text/event-stream response bodies - #1351

Merged
baev merged 1 commit into
allure-framework:mainfrom
Yevhen-Bozhenko:fix/okhttp3-sse-streaming-body
Aug 13, 2026
Merged

baev merged 1 commit into
allure-framework:mainfrom
Yevhen-Bozhenko:fix/okhttp3-sse-streaming-body

Conversation

@Yevhen-Bozhenko

Copy link
Copy Markdown
Contributor

Context

Relates to #1036.

AllureOkHttp3 called ResponseBody.bytes() on every response.
An SSE body only ends when the server closes the connection, so buffering it blocked the interceptor, and no events reached the client until the stream was over.
This skips body capture when the response is text/event-stream and passes the body through untouched.

Note the guard keys off Content-Type, matching how okhttp-sse itself detects SSE - it is not a general "never buffer streaming bodies" fix.

Checklist

@baev baev added the pr:bug Something isn't working label Aug 12, 2026
@baev
baev merged commit 96b7882 into allure-framework:main Aug 13, 2026
5 of 6 checks passed
@baev

baev commented Aug 13, 2026

Copy link
Copy Markdown
Member

@Yevhen-Bozhenko thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants