@increase21/simplenodejs 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -189,7 +189,7 @@ function SetBodyParser(opts) {
189
189
  const isMultipart = contentType.includes("multipart/form-data");
190
190
  let size = 0;
191
191
  let body = "";
192
- req.on("data", chunk => {
192
+ !isMultipart && req.on("data", chunk => {
193
193
  size += chunk.length;
194
194
  if (maxSize && size > maxSize) {
195
195
  reject({ code: 413, error: "Payload Too Large" });
@@ -199,8 +199,7 @@ function SetBodyParser(opts) {
199
199
  req.socket.destroy();
200
200
  return;
201
201
  }
202
- if (!isMultipart)
203
- body += chunk;
202
+ body += chunk;
204
203
  });
205
204
  req.on("end", () => {
206
205
  if (res.writableEnded)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@increase21/simplenodejs",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Lightweight Node.js HTTP framework with middlewares and plugins",
5
5
  "dev": "dist/index.js",
6
6
  "bugs": "https://github.com/increase21/simplenodejs/issues",