You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jaroslav Chmurny (JIRA)" <ji...@apache.org> on 2011/05/27 15:51:47 UTC

[jira] [Created] (NET-411) FTPClient.storeFile transfers zero bytes

FTPClient.storeFile transfers zero bytes
----------------------------------------

                 Key: NET-411
                 URL: https://issues.apache.org/jira/browse/NET-411
             Project: Commons Net
          Issue Type: Bug
          Components: FTP
    Affects Versions: 3.0
         Environment: Java 6, it behaves the same way on Windows and on Solaris.
            Reporter: Jaroslav Chmurny


When I try to upload a file to an FTP server via org.apache.commons.net.ftp.FTPClient.storeFile(String, ImputStream), everything seems to work well. The method returns true, the reply string seems to be OK, I also see in the FTP server that there was a successful transfer. However, zero bytes are transfered, although the ByteArrayInputStream used as the second argument has some data (some hundreds of bytes). When I capture the network traffic with Wireshark, I also see that everything seems to be OK, but the data connection actually transfers no data. Immediately after the TCP handshake, the client closes the connection with FIN. I tried to use a CopyStreamListener to see what's going on - it reports successful transfer of the expected number of bytes. When I perform the same test with Commons Net 2.2 instead of Commons Net 3.0, it works properly - my data gets uploaded, and I get the same OK responses as with 3.0. When switching between 2.2 and 3.0, I do not compile anything
 .

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (NET-411) FTPClient.storeFile transfers zero bytes

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved NET-411.
----------------------

    Resolution: Duplicate

> FTPClient.storeFile transfers zero bytes
> ----------------------------------------
>
>                 Key: NET-411
>                 URL: https://issues.apache.org/jira/browse/NET-411
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0
>         Environment: Java 6, it behaves the same way on Windows and on Solaris.
>            Reporter: Jaroslav Chmurny
>
> When I try to upload a file to an FTP server via org.apache.commons.net.ftp.FTPClient.storeFile(String, ImputStream), everything seems to work well. The method returns true, the reply string seems to be OK, I also see in the FTP server that there was a successful transfer. However, zero bytes are transfered, although the ByteArrayInputStream used as the second argument has some data (some hundreds of bytes). When I capture the network traffic with Wireshark, I also see that everything seems to be OK, but the data connection actually transfers no data. Immediately after the TCP handshake, the client closes the connection with FIN. I tried to use a CopyStreamListener to see what's going on - it reports successful transfer of the expected number of bytes. When I perform the same test with Commons Net 2.2 instead of Commons Net 3.0, it works properly - my data gets uploaded, and I get the same OK responses as with 3.0. When switching between 2.2 and 3.0, I do not compile anythi
 ng.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira