Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-411

FTPClient.storeFile transfers zero bytes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.0
    • None
    • FTP
    • None
    • Java 6, it behaves the same way on Windows and on Solaris.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jaro_chmurny Jaroslav Chmurny
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: