rejetto forum

a bug on file size?

Guest · 2 · 2800

0 Members and 1 Guest are viewing this topic.

Jerry

  • Guest
create a new project in your delphi and try the following code:

httpCli1.URL:='the URL that file in HFS';
httpCli1.ContentRangeBegin:='0';
httpCli1.ContentRangeEnd:='20117550';//the actual size of the file to be download from HFS
httpCli1.Get;

httpCli1 is the Http Client control from ICS which is also utilized in your source code.
BTW, you can send a Head via httpCli to get the filesize beforehand. i.e. httpCli1.Head
The problem is, that whatever the file size you get, you will find that you have to minus the filesize with 1, and then set to the ContentRangeEnd property, the code above will not crach. Otherwise, it will return an 400 exception that "Bad Request" from HFS.

you are welcome to contact me via email if you want to. thanks


Jerry

  • Guest
after upgrade the ICS to the newest version, the problem seems gone
i used httpPort version 1.47 before, not sure what's going on...