Lock after a dowload of more then 32.768 KB
Brought to you by:
dubbeld
When you want to download a file larger then 32.768 KB
the server gets a deadlock. The reason is that a
blocknumber in a UDP Package is saved in 2 bytes, so
the maximum value is 65.536 (65.536*512=32.768KB).
This problem can be solved by simple reset the
blockNumber to 0 when 65.536 is reached. Reset
<sequenceNumber> in TFTPClient.java and
<blockNumber> in ClientHandler.java.
Logged In: YES
user_id=988530
I must say I never tested with so huge file. As you
correctly asserted, the block number is a word in the RFC.
Now, resetting the block number is going to break the RFC
compliance.
I must think a bit more about that. I'm more inclined to
throw an exception when the size is exhausted.
Another option is to add
a 'BigFileDontBotherToBeCompliant' option, which will
allow big files and do some magic with block numbers.
Cheer