0

I'm using IBM datapower and have an XML file which I transfer via FTP and getting the following error

File size mismatch 86232 bytes read, SIZE reports 89964

I already tried to check if it is an EOL issue (ftp between different operation systems) or timing issue (of transfer and read file) but it's not.

After removing all spaces from the file, the error does not appear and the file transfers without issues.

Does anyone know why this happens? How can I avoid it? It looks like spaces effect FTP...

2
  • 1
    Are you perhaps using ASCII mode to transfer those files?
    – Daniel B
    Commented Aug 10, 2020 at 6:19
  • not always...i understood it's because of it...the source is windows OS and dest is linux OS so the is a byte added to every line in XML Commented Aug 10, 2020 at 13:17

1 Answer 1

0

Most of the FTP clients have in their configuration the possibility of transferring detected "txt" files in a different way than binary files. In the same way, some configuration allows to convert characters if the operating system is different (between the server and the client), for example converting windows CRLF to Linux CR.

If you want to avoid these file alterations, it is better to disable this kind of thing, after all an FTP client is made to transfer files, not to modify them, it is up to you to do it "eventually", to your initiative.

Transferring your files in binary mode, whether it is text or not, and deactivating all conversions, you will avoid many worries or "surprises"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .