so as far as i understand

req.pause()
req.on('data',function(){
  console.log('this should not emit')
})

the data event after .pause() should stop emitting events? i just
tried this and it still emits, i'am on node v 0.8.1



On Jul 4, 7:35 am, Dominic Tarr <[email protected]> wrote:
> @mscdex you are correct.
>
> reading the code, in 0.8 http streams will not emit 'data' in the paused 
> state.
>
> https://github.com/joyent/node/blob/master/lib/http.js#L117-125
>
> which has changed from 0.6
>
> https://github.com/joyent/node/blob/v0.6/lib/http.js#L97-107
>
>
>
>
>
>
>
> On Wed, Jul 4, 2012 at 5:13 PM, mscdex <[email protected]> wrote:
> > On Jul 4, 12:24 am, Dominic Tarr <[email protected]> wrote:
> >>http://nodejs.org/api/stream.html#stream_stream_pause
>
> >> so, pause does not buffer. possibly changing to that behaviour will be
> >> explored in 0.9
>
> > That's for streams in general. Check the http core module and you'll
> > see it uses a _pendings array to buffer 'data' events after pausing a
> > request.
>
> > --
> > Job Board:http://jobs.nodejs.org/
> > Posting 
> > guidelines:https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to