Socket
Socket
Sign inDemoInstall

busboy

Package Overview
Dependencies
13
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

30

lib/types/multipart.js

@@ -40,8 +40,11 @@ // TODO:

var nfiles = 0, nfields = 0, nparts = 0;
var nfiles = 0, nfields = 0, nparts = 0, self = this;
this._finished = false;
this._boy = boy;
this.parser = new Dicer({ boundary: boundary });
this.parser.on('part', function onPart(part) {
this.parser.on('part', function(part) {
if (++nparts > partsLimit) {
this.parser.removeListener(onPart);
this.parser.removeAllListeners('part');
return;

@@ -62,11 +65,11 @@ }

}
if (charset === 'us-ascii')
charset = 'ascii';
else if (charset === 'utf-8')
charset = 'utf8';
else if (charset === 'utf-16le')
charset = 'ucs2';
}
if (charset === undefined)
charset = 'ISO-8859-1';
else if (charset === 'us-ascii')
charset = 'ascii';
else if (charset === 'utf-8')
charset = 'utf8';
else if (charset === 'utf-16le')
charset = 'ucs2';

@@ -105,3 +108,3 @@ if (header['content-disposition']) {

file.emit('limit');
part.removeListener(onData);
part.removeAllListeners('data');
} else

@@ -126,3 +129,3 @@ file.emit('data', data);

truncated = true;
part.removeListener(onData);
part.removeAllListeners('data');
} else

@@ -142,2 +145,3 @@ buffer += data.toString('binary');

this.parser.once('end', function() {
self._finished = true;
boy.emit('end');

@@ -153,2 +157,6 @@ });

this.parser.reset();
if (!this._finished) {
this._finished = true;
this._boy.emit('end');
}
};

@@ -155,0 +163,0 @@

@@ -28,3 +28,6 @@ var iconv = require('iconv-lite');

}
if (charset === 'us-ascii')
if (charset === undefined)
charset = 'ISO-8859-1';
else if (charset === 'us-ascii')
charset = 'ascii';

@@ -35,4 +38,2 @@ else if (charset === 'utf-8')

charset = 'ucs2';
else if (charset === undefined)
charset = 'ISO-8859-1';

@@ -39,0 +40,0 @@ this.decoder = new Decoder();

{ "name": "busboy",
"version": "0.0.2",
"version": "0.0.3",
"author": "Brian White <mscdex@mscdex.net>",

@@ -7,3 +7,3 @@ "description": "A node.js module for parsing incoming HTML form data",

"dependencies": {
"dicer": "*",
"dicer": "0.1.2",
"readable-stream": "*",

@@ -10,0 +10,0 @@ "iconv-lite": "0.2.10"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc