HTTP Response pause/resume

144 views
Skip to first unread message

Katsumoto

unread,
Jan 23, 2013, 1:20:28 PM1/23/13
to nod...@googlegroups.com
Hi there,

I'm trying to download a large video file with Http.request, simple example: 
<script src="https://gist.github.com/4611134.js"></script>

So the problem here is that response.pause() looks to not work for all response types.
The video has type of video/webm and pause doesn't work, it looks to just ignore this, but at the same time for application/octet-stream file it works fine.

Is this expected behavior? Does response require limited list of content types which can be paused? Or what i'm doing wrong... ((

Thanks.
Message has been deleted

Katsumoto

unread,
Jan 23, 2013, 1:24:27 PM1/23/13
to nod...@googlegroups.com

greelgorke

unread,
Jan 23, 2013, 3:58:33 PM1/23/13
to nod...@googlegroups.com
http://nodejs.org/api/stream.html#stream_stream_pause second paragraph. did you tried to wait longer before resume? 5 seconds might be not really much

Am Mittwoch, 23. Januar 2013 19:24:27 UTC+1 schrieb Katsumoto:
The gist: https://gist.github.com/4611134

Katsumoto

unread,
Jan 24, 2013, 9:31:13 AM1/24/13
to nod...@googlegroups.com
Yep indeed, it is useless for now. If i wait longer it realy pauses, but before that a lot of data may need to be buffered. In Node v0,9.x looks like this will be handled from the box.
But would be interesting to know how this is influenced by different response types.

среда, 23 января 2013 г., 22:58:33 UTC+2 пользователь greelgorke написал:
Reply all
Reply to author
Forward
0 new messages