Skip to content

Fix: Set Content-Length header explicitly for all request bodies (#831)#840

Merged
bluepal-yaswanth-peravali merged 2 commits intomainfrom
831-arangojs-10-and-nextjs-15-fetch-failed-error-econnreset
Jan 20, 2026
Merged

Fix: Set Content-Length header explicitly for all request bodies (#831)#840
bluepal-yaswanth-peravali merged 2 commits intomainfrom
831-arangojs-10-and-nextjs-15-fetch-failed-error-econnreset

Conversation

@bluepal-yaswanth-peravali
Copy link
Contributor

Summary

Fixes ECONNRESET errors in NextJS 15 production builds by explicitly setting Content-Length header for all request bodies.

Changes

  • Set Content-Length for strings, Blobs, Buffers, FormData, and empty bodies
  • Handle empty strings and null/undefined bodies on POST/PUT/PATCH
  • Respect manually set Content-Length headers
  • Add comprehensive test suite
  • Update CHANGELOG

@bluepal-yaswanth-peravali bluepal-yaswanth-peravali merged commit 4ff255b into main Jan 20, 2026
23 checks passed
@bluepal-yaswanth-peravali bluepal-yaswanth-peravali deleted the 831-arangojs-10-and-nextjs-15-fetch-failed-error-econnreset branch January 20, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArangoJS 10 and NextJS 15 Fetch Failed Error: ECONNRESET

2 participants