-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
The server currently includes chunk characters in the response body when the Transfer-Encoding header is set to chunked. This behavior is causing issues with parsing the response body.
When the header is set to chunked, the server should remove the chunk characters from the response body before returning it.
Steps to reproduce:
- Send a request to the server with the Transfer-Encoding header set to chunked.
- Notice that the response body includes the chunk characters.
Example:
Request
curl --request POST \
--url http://localhost:3000/echo/body/allOf/Pet \
--header 'Content-Type: application/json' \
--header 'Transfer-encoding: chunked' \
--data '{"id":42,"name":"Corgi","category":{"id":1,"name":"Dogs"},"photoUrls":["https://cdn.pixabay.com/photo/2021/10/13/09/01/corgi-6705821_1280.jpg"],"tags":[{"id":1,"name":"cute"}],"status":"sold"}'Response
c0
{"id":42,"name":"Corgi","category":{"id":1,"name":"Dogs"},"photoUrls":["https://cdn.pixabay.com/photo/2021/10/13/09/01/corgi-6705821_1280.jpg"],"tags":[{"id":1,"name":"cute"}],"status":"sold"}
0
Expected behavior:
The server should remove the chunk characters from the response body when the Transfer-Encoding header is set to chunked.
Actual behavior:
The server includes the chunk characters in the response body when the Transfer-Encoding header is set to chunked.
Metadata
Metadata
Assignees
Labels
No labels