-
-
Notifications
You must be signed in to change notification settings - Fork 730
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Bug Description
Not getting the full type when parsing multipart/form-data
Reproducible By
var b = new Blob(['123'], { type: 'text/plain;charset=utf-8'})
var fd = new FormData()
fd.set('x', b)
var res = new Response(fd)
res.clone().text().then(body =>
// Just making sure that it contains ;charset=utf-8 (which it dose)
console.log(body.includes('utf-8'))
)
new Response(fd).formData().then(fd => {
// returns just 'text/plain'
console.log(fd.get('x').type)
})Expected Behavior
To get the full type, text/plain;charset=utf-8
Logs & Screenshots
Environment
Not using undici directly - using Node.js v20.6.1 built in fetch
Additional context
presumable this revolves around the usage around Busboy...
Maybe the type should be extracted from the headers instead...? to get the raw content-type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers

