lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Main reason is, I need the "content-length" from the reply to calculate progress.
Other reasons could be the "filename" header, which you will need, when the filename is not detectable from the url.

If you don't mind the extra connection, you can simply send
a HEAD request before the GET request. That will give you
the headers independently.

If it's a "large file", after a HEAD to grab the content-length you could then maybe use *Range Retrieval Requests* to break the transfer up among concurrent threads.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2

This is a 'neat trick', that I've yet to try, myself ;)