You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent most of my night troubleshooting an issue with Nuxt and traced it to H3, though honestly the issue could be further upstream now that I've dug into the code. Sending a POST request to H3 with transfer-encoding:chunked (as opposed to traditional content-lenght:XX) in the header will fail - there are no errors thrown, the body is empty after sending requests with Postman or Curl.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Node v18.19.0
H3 1.10.1.
MacOS 14.2.1 (Intel)
Reproduction
This can be reproduced with this rep and simply trying to parse an inbound request body received with transfer-encoding:chunked.
Sample mininal app code:
Curl request to reproduce the issue:
curl --location 'http://localhost:3000/api/chunkedtest'
--header 'Content-Type: application/json; charset=utf-8'
--header 'transfer-encoding: chunked'
--data '{"testkey":"testvalue","testkey2":"testvalue2"}'
This request will work:
curl --location 'http://localhost:3000/api/chunkedtest'
--header 'Content-Type: application/json; charset=utf-8'
--header 'Content-Length: 47'
--data '{"testkey":"testvalue","testkey2":"testvalue2"}'
Describe the bug
I spent most of my night troubleshooting an issue with Nuxt and traced it to H3, though honestly the issue could be further upstream now that I've dug into the code. Sending a POST request to H3 with transfer-encoding:chunked (as opposed to traditional content-lenght:XX) in the header will fail - there are no errors thrown, the body is empty after sending requests with Postman or Curl.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: