Subject: [ftpext] File Transfer Protocol RANG Command for Byte Ranges

From: Daniel Stenberg <[email-masked]>
Date: Mon, 20 Dec 2010 09:34:05 +0100 (CET)

Hi friends,

Based on our previous discussions in the "End byte of transfer in FTP" thread 
on this list, we[1] have jotted down a draft for how a new "RANG" command for 
FTP could work:

 	http://www.ietf.org/id/draft-bryan-ftp-range-00.txt

As we see existing use-cases for this feature, we think it would be great to 
get it supported using regular means instead of the "hacks" currently in use 
in FTP clients.

We'd love to get some feedback and comments on what we've come up with so far!

1 = We are Tatsuhiro Tsujikawa, Anthony Bryan and myself.

-- 

  / daniel.haxx.se

---

From: Richard Koenning <[email-masked]>
Date: Mon, 20 Dec 2010 16:37:37 +0100

Hello,

> get it supported using regular means instead of the "hacks" currently in use 

iirc some FTP server implementations support the SIZE/REST commands only 
for TYPE I, because supporting it for TYPE A or E would require to read 
the file completely before giving an answer, which would make the server 
prone to DoS attacks. These implementations will probably confine the 
RANG command to TYPE I too.
The description of error code 551 gives me the impression that the RANG 
command is intended only for TYPE I, but from section 3 i got the 
impression that in principle all representation types shall be 
supported. If the latter is true, but implementations are allowed to 
support e.g. only TYPE I, in my opinion there should be an error code 
for indication of such a partial support besides the all-or-nothing 500/552.
Best regards,
Richard Könning
-- 
Dr. Richard W. Könning
Fujitsu Technology Solutions GmbH

---

From: Daniel Stenberg <[email-masked]>
Date: Mon, 20 Dec 2010 22:37:19 +0100 (CET)

On Mon, 20 Dec 2010, Richard Koenning wrote:

> iirc some FTP server implementations support the SIZE/REST commands only for 
> TYPE I, because supporting it for TYPE A or E would require to read the file 
> completely before giving an answer, which would make the server prone to DoS 
> attacks. These implementations will probably confine the RANG command to 
> TYPE I too.

I think it make sense to limit the command to only TYPE I transfers, as long 
as nobody can come up with a plausible way and use case for another type.

-- 

  / daniel.haxx.se