Comparing version 0.0.3 to 0.0.4
@@ -63,4 +63,4 @@ var EventEmitter = require('events').EventEmitter, | ||
if (buf) | ||
self._parser.push(buf); | ||
var r = self._parser.push(data.slice(start, end)); | ||
self._hparser.push(buf); | ||
var r = self._hparser.push(data.slice(start, end)); | ||
if (!inHeader && r !== undefined && r < end) | ||
@@ -73,3 +73,3 @@ redo(false, data, start + r, end); | ||
isPreamble = false; | ||
self._parser.reset(); | ||
self._hparser.reset(); | ||
self._part.emit('end'); | ||
@@ -82,4 +82,4 @@ self._part = undefined; | ||
this._part = undefined; | ||
this._parser = new HeaderParser(); | ||
this._parser.on('header', function(header) { | ||
this._hparser = new HeaderParser(); | ||
this._hparser.on('header', function(header) { | ||
inHeader = false; | ||
@@ -98,2 +98,3 @@ self._part.emit('header', header); | ||
// allows for "easier" testing | ||
if (this._firstWrite) { | ||
@@ -110,3 +111,4 @@ this._bparser.push(B_CRLF); | ||
Dicer.prototype.end = function(data, encoding) { | ||
this.write(data, encoding); | ||
if (data) | ||
this.write(data, encoding); | ||
this.destroy(); | ||
@@ -118,3 +120,3 @@ }; | ||
this._part = undefined; | ||
this._parser = undefined; | ||
this._bparser = undefined; | ||
this._hparser = undefined; | ||
@@ -121,0 +123,0 @@ this._justMatched = false; |
@@ -19,7 +19,4 @@ var EventEmitter = require('events').EventEmitter, | ||
this.ss.on('info', function(isMatch, data, start, end) { | ||
if (data) { | ||
if (data) | ||
self.buffer += data.toString('ascii', start, end); | ||
if (RE_CRLF.test(self.buffer)) | ||
self._parseHeader(); | ||
} | ||
if (isMatch) { | ||
@@ -26,0 +23,0 @@ if (self.buffer) |
{ "name": "dicer", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": "Brian White <mscdex@mscdex.net>", | ||
@@ -7,4 +7,7 @@ "description": "A very fast streaming multipart parser for node.js", | ||
"dependencies": { | ||
"streamsearch": "*" | ||
"streamsearch": "0.1.2" | ||
}, | ||
"scripts": { | ||
"test": "node test/test.js" | ||
}, | ||
"engines": { "node": ">=0.8.0" }, | ||
@@ -11,0 +14,0 @@ "keywords": [ "parser", "parse", "parsing", "multipart", "form-data", "streaming" ], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
36398
36
1069
0
2
1
+ Addedstreamsearch@0.1.2(transitive)
- Removedstreamsearch@1.1.0(transitive)
Updatedstreamsearch@0.1.2