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

Undesired small chunks when writing buffered chunked body #71

Closed
rmja opened this issue May 17, 2024 · 0 comments · Fixed by #72
Closed

Undesired small chunks when writing buffered chunked body #71

rmja opened this issue May 17, 2024 · 0 comments · Fixed by #72
Assignees

Comments

@rmja
Copy link
Member

rmja commented May 17, 2024

The current behavior when writing a chunked body with into_buffered() is currently not as intended as the buffer seems to be on the wrong side of the chunked writer.

Currently many small chunks are encoded and written to the buffer. Instead of the small body writes should somehow be buffered before the ChunkedBodyWriter such that the buffered content is written in a large chunk.

What I am seeing right now is a request body with waaay to many chunks of only a few bytes which corresponds to each write to the body. Instead I want the small writes to be buffered and only when the buffer is full/flushed should the chunk be written.

cc @bugadani

@rmja rmja self-assigned this May 17, 2024
rmja added a commit to rmja/reqwless that referenced this issue May 17, 2024
This commit:
* Moves the responsibility for writing the request body from `Request` to `HttpConnection`.
* Uses the buffer provided when calling `into_buffered()` to buffer writes before they are passed on to the `ChunkedBufferWriter`

This fixes drogue-iot#71
bugadani pushed a commit to rmja/reqwless that referenced this issue May 21, 2024
This commit:
* Moves the responsibility for writing the request body from `Request` to `HttpConnection`.
* Uses the buffer provided when calling `into_buffered()` to buffer writes before they are passed on to the `ChunkedBufferWriter`

This fixes drogue-iot#71
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.

1 participant