You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Thomas A <th...@gmail.com> on 2012/07/12 14:29:55 UTC

[net] FtpClient.listFiles(String) sends REST

Hi!

We are using FtpClient to perform FTP uploads and downloads. When
first calling .setRestartOffset() and then listFiles(String) on the
FtpClient object, we have found that the restart offset is sent to the
server, that is REST, LIST is sent. Is this correct behavior?

>From what I can gather from the javadoc, REST is only supposed to be
sent before file transfers.
("... The restart command is sent to the server only before sending
the file transfer command. ..."
http://commons.apache.org/net/api-3.1/org/apache/commons/net/ftp/FTPClient.html#setRestartOffset(long)
 )

Regards,
Thomas Axelsson

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [net] FtpClient.listFiles(String) sends REST

Posted by Thomas A <th...@gmail.com>.
Thanks for the quick response!

//Thomas

On Sat, Jul 14, 2012 at 1:17 PM, sebb <se...@gmail.com> wrote:
> On 13 July 2012 10:18, sebb <se...@gmail.com> wrote:
>> On 13 July 2012 08:03, Thomas A <th...@gmail.com> wrote:
>>> I have filed an issue here https://issues.apache.org/jira/browse/NET-475
>>
>> Thanks; we'll take a look as soon as we can.
>
> The setRestartOffset method is only intended for use with file transfers.
>
> As such, it should only be used immediately prior to the file transfer
> to which it applies.
>
> The Javadoc has been updated to clarify this.
>
>>> //Thomas
>>>
>>> On Thu, Jul 12, 2012 at 7:11 PM, sebb <se...@gmail.com> wrote:
>>>> On 12 July 2012 13:29, Thomas A <th...@gmail.com> wrote:
>>>>> Hi!
>>>>>
>>>>> We are using FtpClient to perform FTP uploads and downloads. When
>>>>> first calling .setRestartOffset() and then listFiles(String) on the
>>>>> FtpClient object, we have found that the restart offset is sent to the
>>>>> server, that is REST, LIST is sent. Is this correct behavior?
>>>>
>>>> Does not sound right.
>>>>
>>>>> From what I can gather from the javadoc, REST is only supposed to be
>>>>> sent before file transfers.
>>>>> ("... The restart command is sent to the server only before sending
>>>>> the file transfer command. ..."
>>>>> http://commons.apache.org/net/api-3.1/org/apache/commons/net/ftp/FTPClient.html#setRestartOffset(long)
>>>>>  )
>>>>
>>>> Can you file a JIRA issue with sample code and output from a command listener?
>>>>
>>>> e.g.
>>>>
>>>> ftp.addProtocolCommandListener(new PrintCommandListener(new
>>>> PrintWriter(System.out), true));
>>>>
>>>> Thanks!
>>>>
>>>>> Regards,
>>>>> Thomas Axelsson
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [net] FtpClient.listFiles(String) sends REST

Posted by sebb <se...@gmail.com>.
On 13 July 2012 10:18, sebb <se...@gmail.com> wrote:
> On 13 July 2012 08:03, Thomas A <th...@gmail.com> wrote:
>> I have filed an issue here https://issues.apache.org/jira/browse/NET-475
>
> Thanks; we'll take a look as soon as we can.

The setRestartOffset method is only intended for use with file transfers.

As such, it should only be used immediately prior to the file transfer
to which it applies.

The Javadoc has been updated to clarify this.

>> //Thomas
>>
>> On Thu, Jul 12, 2012 at 7:11 PM, sebb <se...@gmail.com> wrote:
>>> On 12 July 2012 13:29, Thomas A <th...@gmail.com> wrote:
>>>> Hi!
>>>>
>>>> We are using FtpClient to perform FTP uploads and downloads. When
>>>> first calling .setRestartOffset() and then listFiles(String) on the
>>>> FtpClient object, we have found that the restart offset is sent to the
>>>> server, that is REST, LIST is sent. Is this correct behavior?
>>>
>>> Does not sound right.
>>>
>>>> From what I can gather from the javadoc, REST is only supposed to be
>>>> sent before file transfers.
>>>> ("... The restart command is sent to the server only before sending
>>>> the file transfer command. ..."
>>>> http://commons.apache.org/net/api-3.1/org/apache/commons/net/ftp/FTPClient.html#setRestartOffset(long)
>>>>  )
>>>
>>> Can you file a JIRA issue with sample code and output from a command listener?
>>>
>>> e.g.
>>>
>>> ftp.addProtocolCommandListener(new PrintCommandListener(new
>>> PrintWriter(System.out), true));
>>>
>>> Thanks!
>>>
>>>> Regards,
>>>> Thomas Axelsson
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [net] FtpClient.listFiles(String) sends REST

Posted by sebb <se...@gmail.com>.
On 13 July 2012 08:03, Thomas A <th...@gmail.com> wrote:
> I have filed an issue here https://issues.apache.org/jira/browse/NET-475

Thanks; we'll take a look as soon as we can.

> //Thomas
>
> On Thu, Jul 12, 2012 at 7:11 PM, sebb <se...@gmail.com> wrote:
>> On 12 July 2012 13:29, Thomas A <th...@gmail.com> wrote:
>>> Hi!
>>>
>>> We are using FtpClient to perform FTP uploads and downloads. When
>>> first calling .setRestartOffset() and then listFiles(String) on the
>>> FtpClient object, we have found that the restart offset is sent to the
>>> server, that is REST, LIST is sent. Is this correct behavior?
>>
>> Does not sound right.
>>
>>> From what I can gather from the javadoc, REST is only supposed to be
>>> sent before file transfers.
>>> ("... The restart command is sent to the server only before sending
>>> the file transfer command. ..."
>>> http://commons.apache.org/net/api-3.1/org/apache/commons/net/ftp/FTPClient.html#setRestartOffset(long)
>>>  )
>>
>> Can you file a JIRA issue with sample code and output from a command listener?
>>
>> e.g.
>>
>> ftp.addProtocolCommandListener(new PrintCommandListener(new
>> PrintWriter(System.out), true));
>>
>> Thanks!
>>
>>> Regards,
>>> Thomas Axelsson
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [net] FtpClient.listFiles(String) sends REST

Posted by Thomas A <th...@gmail.com>.
I have filed an issue here https://issues.apache.org/jira/browse/NET-475

//Thomas

On Thu, Jul 12, 2012 at 7:11 PM, sebb <se...@gmail.com> wrote:
> On 12 July 2012 13:29, Thomas A <th...@gmail.com> wrote:
>> Hi!
>>
>> We are using FtpClient to perform FTP uploads and downloads. When
>> first calling .setRestartOffset() and then listFiles(String) on the
>> FtpClient object, we have found that the restart offset is sent to the
>> server, that is REST, LIST is sent. Is this correct behavior?
>
> Does not sound right.
>
>> From what I can gather from the javadoc, REST is only supposed to be
>> sent before file transfers.
>> ("... The restart command is sent to the server only before sending
>> the file transfer command. ..."
>> http://commons.apache.org/net/api-3.1/org/apache/commons/net/ftp/FTPClient.html#setRestartOffset(long)
>>  )
>
> Can you file a JIRA issue with sample code and output from a command listener?
>
> e.g.
>
> ftp.addProtocolCommandListener(new PrintCommandListener(new
> PrintWriter(System.out), true));
>
> Thanks!
>
>> Regards,
>> Thomas Axelsson
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [net] FtpClient.listFiles(String) sends REST

Posted by sebb <se...@gmail.com>.
On 12 July 2012 13:29, Thomas A <th...@gmail.com> wrote:
> Hi!
>
> We are using FtpClient to perform FTP uploads and downloads. When
> first calling .setRestartOffset() and then listFiles(String) on the
> FtpClient object, we have found that the restart offset is sent to the
> server, that is REST, LIST is sent. Is this correct behavior?

Does not sound right.

> From what I can gather from the javadoc, REST is only supposed to be
> sent before file transfers.
> ("... The restart command is sent to the server only before sending
> the file transfer command. ..."
> http://commons.apache.org/net/api-3.1/org/apache/commons/net/ftp/FTPClient.html#setRestartOffset(long)
>  )

Can you file a JIRA issue with sample code and output from a command listener?

e.g.

ftp.addProtocolCommandListener(new PrintCommandListener(new
PrintWriter(System.out), true));

Thanks!

> Regards,
> Thomas Axelsson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org