actix-web icon indicating copy to clipboard operation
actix-web copied to clipboard

Added max_buffer_size as a configuration item on the httpservice

Open ngrondin opened this issue 4 months ago • 0 comments

PR Type

Feature

PR Checklist

  • [x] Tests for the changes have been added / updated.
  • [x] Documentation comments have been added / updated.
  • [ ] A changelog entry has been made for the appropriate packages.
  • [x] Format code with the latest stable rustfmt.
  • [ ] (Team) Label with affected crates and semver status.

Overview

No breaking changes. This new feature allows the user to configure the max_buffer_size used by the http service dispatcher, rather than rely on a const value. This is important to control the chunk size in streaming scenarios. For example, when streaming images in a multipart/x-mixed-replace, if the images are smaller than the const MAX_BUFFER_SIZE, they will buffer and affect the end-user's refresh rate. With this feature, the user can select a lower max_buffer_size and stream arbitrarily small chunks.

ngrondin avatar Jun 01 '25 06:06 ngrondin