(req)
| 379 | } |
| 380 | |
| 381 | function readBody(req) { |
| 382 | return new Promise((resolve, reject) => { |
| 383 | const chunks = []; |
| 384 | req.on("data", chunk => chunks.push(chunk)); |
| 385 | req.on("end", () => resolve(Buffer.concat(chunks))); |
| 386 | req.on("error", reject); |
| 387 | }); |
| 388 | } |
| 389 | |
| 390 | function parseMultipart(buffer, contentType) { |
| 391 | const match = /boundary=(?:"([^"]+)"|([^;]+))/i.exec(contentType || ""); |
no outgoing calls
no test coverage detected