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

Update adapter docs suggested behaviour regarding chunk/2 return types #1204

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

mtrudel
Copy link
Contributor

@mtrudel mtrudel commented Jan 15, 2024

Mostly intended to remove the suggestion that adapter implementations return a simple :ok from chunk/2 calls.

Blind adherence to this suggestion early on the development of Bandit has caused me no end of grief by preventing the adapter from being able to track state for aspects of metrics, H2 send window management, etc. I was today years old when I actually realized that Plug would have let me track chunking state this whole time. The change in wording here is to save the next webserver implementor from the same fate.

@josevalim josevalim merged commit 67cbc7c into elixir-plug:main Jan 15, 2024
2 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@mtrudel mtrudel deleted the tidy_adapter_chunk_notes branch January 15, 2024 22:09
@mtrudel
Copy link
Contributor Author

mtrudel commented Jan 16, 2024

Could I entice y'all to push a release soon? Turns out that the typespec change in this PR is actually important downstream; dialyzer complains otherwise if you attempt to return nil as a body

@josevalim
Copy link
Member

Done!

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