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
Below is a small illustration. In both cases I'm sending 4 bytes. In the first case (which has a value over 0x7F), the size is incorrectly reported as '1'. In the second case (no values over 0x7F), it is correctly reported as '4' and all the data is intact.
Server:
app.post('/api', multipartMiddleware, function(req, res){
var body = req.body.name;
console.log('body',req.body);
console.log('req body len', body.length);
res.send("respond with a resource");
});
Express server listening on port 3000
body { name: '\u0000' }
req body len 1
POST /api 200 9ms - 23b
body { name: '\u0000\u000f\u0000\u0000' }
req body len 4
POST /api 200 3ms - 23b
The text was updated successfully, but these errors were encountered:
This looks like a rather nasty bug. Thanks for the report. Feel free to start working on a fix and make a pull request; otherwise I'll get around to it eventually.
ah, I should have known that. Thanks. It's been a while since I've messed with this stuff; my head is full of audio-processing and 3D graphics lately :)
(Originally posted here: expressjs/express#1855)
Below is a small illustration. In both cases I'm sending 4 bytes. In the first case (which has a value over 0x7F), the size is incorrectly reported as '1'. In the second case (no values over 0x7F), it is correctly reported as '4' and all the data is intact.
Server:
Python test client:
Express output:
The text was updated successfully, but these errors were encountered: