Darin Fisher napisał(a):
The stream returned by nsIChannel::open implements blocking i/o, but
under the hood the data is being buffered as it arrives. So, at first
there is no data available in the stream, then as more data arrives the
amount available in the buffer increases. In this particular example,
the stream actually blocks until it can report a non-zero amount
available or some error occurs. You cannot use available as a measure
of the total stream length. For that you should use
nsIChannel::contentLength, but that is often -1 (for HTTP chunked data)
or the wrong number (for HTTP content encoded data).
Thanks for reply. So what should I do ? Is there any other solution to
download (synchronously) file from HTTP ?
ML
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom