rejetto forum
Software => HFS ~ HTTP File Server => Bug reports => Topic started by: mWaltari on March 26, 2007, 06:14:37 PM
-
Hello,
I have situation where coming file is marked :
1 941 903 702 / -1 206 321 567 received .. -16:-19:-51 (Time left)
Maybe overflow of some kind???
-Tommi Prami-
[attachment deleted by admin]
-
hi tommi
i currently use 64bit for that thing, so it should never overflow (but maybe it does somewhere in operations).
can you tell me the HFS version your using?
-
hi tommi
i currently use 64bit for that thing, so it should never overflow (but maybe it does somewhere in operations).
can you tell me the HFS version your using?
I am using build 088
The it should not Overflow, on real world files :)
Person who send me those files, thought that it might be related that he send two 1gb+ files simultaneously. Just an hunch...
-Tommi-
-
the time left is negative because of the negative total, for sure.
here is where i get that value
try post.length:=strToInt64(getHeader('Content-Length'))
except end;
strToInt64 is a standard delphi function.
as you can see (google tells me you are a programmer), the bug is probably in the browser, furnishing a negative value in "content-length".
i could put a workaround: if a negative value is read, add 2GB.
what do you think of it?
-
actually, this is the workaround i just added
if post.length < 0 then inc(post.length, int64(2) shl 31);
-
That might do...
Do you use some Socket component(s) like Indy?? or raw sockets "by hand" :)
-TP-
-
i use ICS,
very different from indy because it uses an asynchronous paradigm.