Comparing version 0.2.1 to 0.2.2
@@ -87,10 +87,4 @@ var WritableStream = require('stream').Writable | ||
this.emit('preamble', this._part); | ||
else { | ||
this._ignoreData = true; | ||
this._part.on('error', EMPTY_FN); | ||
// we must perform some kind of read on the stream even though we are | ||
// ignoring the data, otherwise node's Readable stream will not emit 'end' | ||
// after pushing null to the stream | ||
this._part.resume(); | ||
} | ||
else | ||
this._ignore(); | ||
} | ||
@@ -132,2 +126,13 @@ var r = this._hparser.push(data); | ||
Dicer.prototype._ignore = function() { | ||
if (this._part && !this._ignoreData) { | ||
this._ignoreData = true; | ||
this._part.on('error', EMPTY_FN); | ||
// we must perform some kind of read on the stream even though we are | ||
// ignoring the data, otherwise node's Readable stream will not emit 'end' | ||
// after pushing null to the stream | ||
this._part.resume(); | ||
} | ||
}; | ||
Dicer.prototype._oninfo = function(isMatch, data, start, end) { | ||
@@ -174,10 +179,4 @@ var buf, self = this, i = 0, r, ev, shouldWriteMore = true; | ||
this.emit(ev, this._part); | ||
else { | ||
this._ignoreData = true; | ||
this._part.on('error', EMPTY_FN); | ||
// we must perform some kind of read on the stream even though we are | ||
// ignoring the data, otherwise node's Readable stream will not emit 'end' | ||
// after pushing null to the stream | ||
this._part.resume(); | ||
} | ||
else | ||
this._ignore(); | ||
if (!this._isPreamble) | ||
@@ -184,0 +183,0 @@ this._inHeader = true; |
{ "name": "dicer", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"author": "Brian White <mscdex@mscdex.net>", | ||
@@ -4,0 +4,0 @@ "description": "A very fast streaming multipart parser for node.js", |
@@ -17,3 +17,2 @@ var Dicer = require('..'); | ||
nparts: 0, | ||
//events: ['preamble', 'part'], | ||
what: 'No preamble or part listeners' | ||
@@ -20,0 +19,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
54778
1485