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

with_chunked_body does not support backpressure #175

Closed
kornelski opened this issue Sep 12, 2023 · 1 comment · Fixed by #176
Closed

with_chunked_body does not support backpressure #175

kornelski opened this issue Sep 12, 2023 · 1 comment · Fixed by #176

Comments

@kornelski
Copy link
Contributor

Currently with_chunked_body writes the entire body to a buffer.

This makes it impossible to test how servers stream the body: I don't control timing between chunks. I can't make an infinitely-long stream to test when the server will refuse to read it.

IMHO the chunked stream should spawn the callback on a thread, and use tokio's channel to send bytes to the body, as they're written.

@lipanski
Copy link
Owner

@kornelski I agree. I think this regression was introduced with the tokio rewrite. not sure when I'll be able to tackle this but PRs are welcome as always 😸

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 a pull request may close this issue.

2 participants