Content length

Giganews Newsgroups
Subject: Content length
Posted by:  Constantine Hvan (darkjudicat…@mail.ru)
Date: Thu, 24 Jul 2003

Hallo !

My application determines the length of the remote file on some step.
Like that:

  IdHTTP1->Head(FileURLEdt->Text);
  iFileSize = IdHTTP1->Response->ContentLength;

But some of servers does't support Head method (connection closed gracefully
exception is raised anytime but downloading is ok)
So Get method works fine.
Show me please, how can I know the length of remote file without starting to
download it (by Get method somehow?).

Best regards, Constantine.

Replies