I'm talking about starting a buffered stream in the first tick and then
only using it in the second tick if you need it.  If you wish you can also
send it a pause but it will eventually disappear even if you do nothing.

On Wed, Apr 18, 2012 at 4:52 PM, Kilian C. <[email protected]>wrote:

> Mark I don't think you're getting the point... I don't know if I need the
> payload, I will know in the next tick, but it will be too late, I already
> missed some chunk.
>
> Related topic
> http://groups.google.com/group/nodejs/browse_thread/thread/a7386d38ee9e3d9d?pli=1
>
> As I see the buffering thing Tim was talking about is related to the
> request.pause() method, that not buffers chunks that are already in flight
> at the 'pause' momentum.
>
>
>
> On Wed, Apr 18, 2012 at 4:31 PM, Mark Hahn <[email protected]> wrote:
>
>> You can just ignore the payload and it will be eventually
>> garbage-collected.
>>
>>
>> On Wed, Apr 18, 2012 at 3:27 PM, Kilian C. <[email protected]>wrote:
>>
>>> So basically, we can't avoid to receive the payload of an http request
>>> right?
>>> I mean, this is in the http protocol itself, for example, I can't check
>>> the cookie of an user and then start receiving an upload,
>>> I should start to buffer the payload and discard it on authorization
>>> failure (after a db query for example)?
>>>
>>> On Wed, Apr 18, 2012 at 2:20 PM, Mikeal Rogers 
>>> <[email protected]>wrote:
>>>
>>>> Not yet, expect it in 0.9 along with an option `size` param that will
>>>> set the number of bytes to buffer before returning false on write.
>>>>
>>>> On Apr 18, 2012, at April 18, 20121:59 PM, Tim Caswell wrote:
>>>>
>>>> Doesn't .pause() now buffer internally?  In my testing I haven't missed
>>>> any events as long as I .pause() on the first tick.  I would like to know
>>>> if this is supported behavior.
>>>>
>>>> On Wed, Apr 18, 2012 at 3:49 PM, Mark Hahn <[email protected]> wrote:
>>>>
>>>>> There is a buffered stream available from Mikeal that solves this
>>>>> problem.
>>>>>
>>>>>
>>>>> On Wed, Apr 18, 2012 at 1:47 PM, mscdex <[email protected]> wrote:
>>>>>
>>>>>> On Apr 18, 4:42 pm, "Kilian C." <[email protected]> wrote:
>>>>>> > As I wrote in the subject:
>>>>>> > Are request events handlers must be added in the same tick of the
>>>>>> http
>>>>>> > request handler execution?
>>>>>>
>>>>>> Yes, you should add a handler immediately so as not to miss any data
>>>>>> chunks from the request. You are not required to do so however.
>>>>>>
>>>>>> --
>>>>>> 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
>>>>>
>>>>
>>>>
>>>> --
>>>> 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
>>>>
>>>
>>>  --
>>> 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
>>
>
>  --
> 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