[EMAIL PROTECTED] wrote:
OK. Two scripts have been posted to REBOL.org though not yet linked
from the main page. Go to:
http://www.rebol.org/unsupported/
for a brief text blurb and the files. These are the FTP and HTTP
protocols modified so that a wisely formed read/custom call will make
use of the partial read functionality of many web browsers and the
restart command that exists in some ftp servers.
If these changes make it into a full release version of REBOL then
thes files will be removed from this location never to be seen from
again as they perish into /dev/null.
Sterling
If I totally messed up and the files fail all over the place for you
I'll fix them quickly so they work but they are unsupported so nobody
is going to constantly be updating them with bug fixes as you find
servers they don't work on. If somebody wants to take it on as their
script, then just grab it and post it back into the REBOL.org script
library. Then you can update it all you like.
Party on Wayne! Party on Garth!
Also, remember that the first byte is 0...
read/custom http://www.ibm.com/index.html [restart 1 reend 2]
This reads the *second* byte and the third byte, so the length
is (3 - 2) + 1 = 2
read/custom http://www.ibm.com/index.html [restart 10 reend 20]
Read from the eleventh byte upto and including the twenty-first byte, a
length of
(21 - 11) + 1 = 21
Rebol will also translate line terminators, which is why (on a Windows
machine) -
length? read/custom http://www.ibm.com/index.html [restart 100 reend 1000]
== 899
The length that was actually read is (1001 - 101) + 1 = 901, but Rebol
removed two #"^M"'s.
Using the binary refinement is a wise choice -
length? read/binary/custom http://www.ibm.com/index.html [restart 100 reend 1000]
== 901
The same applies to ftp, [restart 1] will start reading from the second
byte, and you'll probably want to use the binary refinement to avoid
confusion.
Julian Kinraid