Skip to content

Conversation

@usualoma
Copy link
Member

@usualoma usualoma commented Jun 6, 2025

fixes: #244

Even if data is not immediately written from a ReadableStream, the header is sent without waiting for the data.

Is it sufficient to only handle ServerResponse?

Yes, in the case of Http2ServerResponse, there is no need to explicitly flush because the header is sent without waiting for the data.

Is this related to change #242?

No, it is not related. node-server has always behaved this way.

@usualoma
Copy link
Member Author

usualoma commented Jun 6, 2025

Hi @yusukebe!
Would you please review this?

@yusukebe
Copy link
Member

yusukebe commented Jun 6, 2025

Hey @usualoma !

Great! I've confirmed that it works correctly. Thank you!

@yusukebe yusukebe merged commit 69d274d into honojs:main Jun 6, 2025
3 checks passed
@yusukebe yusukebe changed the title feat: flush headers before sending data via readable stream fix: flush headers before sending data via readable stream Jun 6, 2025
@usualoma usualoma deleted the flush-headers-readable-stream branch June 7, 2025 05:12
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.

node-server doesn't flush headers until content is written to it

2 participants