Skip to content

docs(humafiber): note streamed request bodies are not decoded - #1118

Merged
wolveix merged 1 commit into
mainfrom
docs-fiber-stream-content-encoding
Sep 24, 2026
Merged

wolveix merged 1 commit into
mainfrom
docs-fiber-stream-content-encoding

Conversation

@wolveix

@wolveix wolveix commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #1111.

With StreamRequestBody enabled, humafiber passes the raw BodyStream() through, so Content-Encoding isn't decoded. Buffered bodies still go through Fiber's Body() and arrive decoded (#928, #1058).

This documents that behaviour rather than decoding in the adapter:

  • None of the other adapters decode request bodies (net/http never does), so the streaming path already matches them.
  • Decoding ourselves means Fiber-only decompression with its own bomb protection (e.g. zstd window limits) and client error mapping. MaxBodyBytes alone doesn't cover it.
  • Falling back to Body() when streaming isn't safe: fasthttp reads the whole stream into memory without enforcing the body limit.

Changes:

  • Comment on BodyReader in both Fiber adapters explaining the passthrough.
  • New "Compressed Request Bodies" section in the request limits docs, pointing to router middleware (e.g. Echo's middleware.Decompress).

@wolveix
wolveix merged commit 5d2b1be into main Sep 24, 2026
5 checks passed
@wolveix
wolveix deleted the docs-fiber-stream-content-encoding branch September 24, 2026 21:35
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (47f6975) to head (fe41dad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1118   +/-   ##
=======================================
  Coverage   93.19%   93.19%           
=======================================
  Files          24       24           
  Lines        5008     5008           
=======================================
  Hits         4667     4667           
  Misses        273      273           
  Partials       68       68           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

If fiber's StreamRequestBody is enabled and request body compression is enabled, the request will fail.

1 participant