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
there seems to be an issue with busboy reading the Content-Transfer-Encoding.
I cannot access this information per field although it is present in the raw data.
Please note that i truncated the actual field values.
I verified its presence by outputting the raw received data on nginx level:
app.post('/ids',(req,res)=>{constbusboy=Busboy({headers: req.headers});busboy.on('headers',(headers,fieldName,encoding,mimetype)=>{console.log(`Headers for part [${fieldName}] with mimetype [${mimetype}]`);console.log(headers);});busboy.on('field',(fieldname,val,fieldnameTruncated,valTruncated,encoding,mimetype)=>{console.log('Field ['+fieldname+']:');console.log(' Content-Type: '+mimetype);console.log(' Content-Transfer-Encoding: '+encoding);console.log(' value: '+val);});busboy.on('finish',()=>{res.send('File uploaded successfully!');});req.pipe(busboy);});
This is running on an express server. We were actually using multer to access the multipart data and knowing that busboy is the underlying lib - we tested it using the example code (with the same result).
const busboy = Busboy({ headers: req.headers });
busboy.on('field', (name, value, info) => {
console.log('Field [' + name + ']:');
console.log(' value: ' + value);
console.log(' Encoding: ' + info.encoding);
});
busboy.on('finish', () => {
res.send('File uploaded successfully!');
});
req.pipe(busboy);
});```
Thanks for the super fast response.
Then this must be an issue with multer or a version conflict there. I will further investigate.
Hola everyone,
there seems to be an issue with busboy reading the Content-Transfer-Encoding.
I cannot access this information per field although it is present in the raw data.
Please note that i truncated the actual field values.
I verified its presence by outputting the raw received data on nginx level:
Transmitted data on nginx level
0.0.0.0 - - [07/Apr/2023:13:15:27 +0200] "POST /truncated HTTP/2.0" 200 27 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62" "----------040723131528994\x0D\x0AContent-Disposition: form-data; name=\x22kndnr\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Atruncated\x0D\x0AContent-Disposition: form-data; name=\x22name_kunde\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Atruncated\x0D\x0A----------040723131528994\x0D\x0AContent-Disposition: form-data; name=\x22pw_kunde\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Atruncated\x0A----------040723131528994\x0D\x0AContent-Disposition: form-data; name=\x22version\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Atruncated—————040723131528994\x0D\x0AContent-Disposition: form-data; name=\x22action\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Atruncated\x0D\x0A----------040723131528994\x0D\x0AContent-Disposition: form-data; name=\x22hookurl\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Ahttp://127.0.0.1\x0D\x0A----------040723131528994\x0D\x0AContent-Disposition: form-data; name=\x22warenkorb\x22\x0D\x0AContent-Type: text/plain\x0D\x0AContent-Transfer-Encoding: quoted-printable\x0D\x0A\x0D\x0Atruncated\x0D\x0A----------040723131528994--\x0D\x0A"0.014 0.014 . 297
Output of test script
Test script
This is running on an express server. We were actually using multer to access the multipart data and knowing that busboy is the underlying lib - we tested it using the example code (with the same result).
Versions
The text was updated successfully, but these errors were encountered: