Yep I just read about this.
Is there a way to patch the request obj and use you BufferedStream instead?
This is the only way to let modules like formidable keep working after a
pause()

On Wed, Apr 18, 2012 at 5:08 PM, Mikeal Rogers <[email protected]>wrote:

>
> On Apr 18, 2012, at April 18, 20123:27 PM, Kilian C. 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)?
>
>
> You can check the cookie if you have the information to resolve that logic
> in memory but not if you need to do IO. If you want to ask a question via
> IO then you'll need to buffer the incoming data (for now, in 0.9 you'll be
> able to req.pause(1024) and it'll buffer the data for you).
>
>
> 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

Reply via email to