rejetto forum
May 24, 2012, 07:15:28 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: a bug on file size?  (Read 1017 times)
0 Members and 1 Guest are viewing this topic.
Jerry
Guest


Email
« on: August 30, 2006, 07:52:11 PM »

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
Logged
Jerry
Guest


Email
« Reply #1 on: August 31, 2006, 02:39:49 PM »

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...
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 21, 2012, 05:19:02 AM