Browse Source

http: Handle end only when stream is not dumped

This fixes regression introduced in some cases by 8bf0c15
v0.9.5-release
isaacs 12 years ago
parent
commit
d76eacd4e6
  1. 4
      lib/http.js

4
lib/http.js

@ -160,7 +160,9 @@ function parserOnMessageComplete() {
stream._readableState.onread(null, null); stream._readableState.onread(null, null);
} }
if (!stream._readableState.endEmitted && !parser.incoming._pendings.length) { if (stream &&
!stream._readableState.endEmitted &&
!parser.incoming._pendings.length) {
// For emit end event // For emit end event
stream._readableState.onread(null, null); stream._readableState.onread(null, null);
} }

Loading…
Cancel
Save