http: Set _dumped=false initially
authorisaacs <i@izs.me>
Fri, 11 Jan 2013 02:16:43 +0000 (18:16 -0800)
committerisaacs <i@izs.me>
Fri, 11 Jan 2013 02:16:43 +0000 (18:16 -0800)
The better to keep the IncomingMessage class isomorphic and avoid
creating additional hidden classes.

lib/http.js

index 687c335..867d026 100644 (file)
@@ -314,6 +314,10 @@ function IncomingMessage(socket) {
 
   // flag for backwards compatibility grossness.
   this._consuming = false;
+
+  // flag for when we decide that this message cannot possibly be
+  // read by the user, so there's no point continuing to handle it.
+  this._dumped = false;
 }
 util.inherits(IncomingMessage, Stream.Readable);