Closed alambert-idkids closed 2 years ago
Hi Gravitee Team ! I encounetred a probleme with the policy Http Callout.
Via this one, I want to make a call with the original body of the request.
When the body doesn't contains accented characters, everything is ok ! But when the body contains accented characters, the sent body is truncated ✂️
Create a new API
Add HTTP Callout policy on request flow
Configure the policy:
Make a POST request to the API with body containing accents
{ "name": "name with accents éà" }
The backend server receives the following body:
{ "name": "name with accents éà"
Simple node.js server code:
const http = require('http') const port = process.env.PORT || 3000 const server = http.createServer(async (req, res) => { const buffers = []; for await (const chunk of req) { buffers.push(chunk); } const data = Buffer.concat(buffers).toString(); console.log(data); res.end(); }); server.listen(port, () => { console.log(`Server running at port ${port}`) })
The fix is potentially the same as this
The content length should be miscalculated
@alambert-idkids 🎉 the fix for this issue has been released in 1.15.1:
:collision: Describe the bug
Hi Gravitee Team ! I encounetred a probleme with the policy Http Callout.
Via this one, I want to make a call with the original body of the request.
When the body doesn't contains accented characters, everything is ok ! But when the body contains accented characters, the sent body is truncated ✂️
:sunrise_over_mountains: To Reproduce
Create a new API
Add HTTP Callout policy on request flow
Configure the policy:
Make a POST request to the API with body containing accents
:rainbow: Expected behaviour
The backend server receives the following body:
🌧️ Current behaviour
The backend server receives the following body:
:movie_camera: Useful information
Simple node.js server code:
:computer: Environment:
🩹 Possible fix
The fix is potentially the same as this
The content length should be miscalculated