Home > Back-end >  FTPClient TXT file uploading file has been tampered with. Newline is incidental. The file content ch
FTPClient TXT file uploading file has been tampered with. Newline is incidental. The file content ch

Time:12-23

Org.apache.commons.net.ftp.FTPClient

Program is running on the Linux environment, erect on AIX server, FTP server

In a program using FTPClient upload TXT file, occasionally there will be a file to be tampered with (currently found several times are larger files, there are hundreds of lines of records)

Will be more than one character in the original file, such as "6", "\ r", "|", etc.,

Currently found only at the time of break

Set the main passive mode and file types, but still no effect,

FtpClient. SetFileType (ftpClient. BINARY_FILE_TYPE);
FtpClient. EnterLocalPassiveMode ();

Online article said the two method call sequence is first need to set up the passive mode, but changed the no effect, in the website, BBS etc were found evidence of this statement,

For help, the problem of production, very urgent, give directions genuflect is begged

CodePudding user response:

Run test environment has been no problem, production occurs, not sure if the FTP server for the reason of aix system, but the file type is set up
  • Related