No Content-Length header, nor length property
jon+usenet at unequivocal.co.uk
Wed Jul 8 12:00:14 CEST 2015
On 2015-07-08, zljubisic at gmail.com <zljubisic at gmail.com> wrote:
> Why I can't get the size of this particular file?
> On other servers, the same procedure would return file size in
> bytes, but not for this file?
> Does it depend on server itself, or there is a way to get remote
> file size before downloading?
Yes, it depends on whether the server sends a Content-Length header,
and no, if the server does not send the header then there is no way
to determine the file size without downloading it all.
More information about the Python-list