Is Indy FTP client caching?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Looking at corrupted files on FTP server I think about verifying files uploaded with TIdFtp.Put by downloading them just after upload and comparing byte-to byte.



I think that TIdFtp may be theoretically caching data and return it from cache instead of actually downloading.



Please allay or confirm my concerns.










share|improve this question























  • I don't think it is. What is that assumption based on?

    – GolezTrol
    Nov 24 '18 at 13:29


















0















Looking at corrupted files on FTP server I think about verifying files uploaded with TIdFtp.Put by downloading them just after upload and comparing byte-to byte.



I think that TIdFtp may be theoretically caching data and return it from cache instead of actually downloading.



Please allay or confirm my concerns.










share|improve this question























  • I don't think it is. What is that assumption based on?

    – GolezTrol
    Nov 24 '18 at 13:29














0












0








0








Looking at corrupted files on FTP server I think about verifying files uploaded with TIdFtp.Put by downloading them just after upload and comparing byte-to byte.



I think that TIdFtp may be theoretically caching data and return it from cache instead of actually downloading.



Please allay or confirm my concerns.










share|improve this question














Looking at corrupted files on FTP server I think about verifying files uploaded with TIdFtp.Put by downloading them just after upload and comparing byte-to byte.



I think that TIdFtp may be theoretically caching data and return it from cache instead of actually downloading.



Please allay or confirm my concerns.







delphi caching ftp indy






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 24 '18 at 12:08









PaulPaul

10.7k2994186




10.7k2994186













  • I don't think it is. What is that assumption based on?

    – GolezTrol
    Nov 24 '18 at 13:29



















  • I don't think it is. What is that assumption based on?

    – GolezTrol
    Nov 24 '18 at 13:29

















I don't think it is. What is that assumption based on?

– GolezTrol
Nov 24 '18 at 13:29





I don't think it is. What is that assumption based on?

– GolezTrol
Nov 24 '18 at 13:29












1 Answer
1






active

oldest

votes


















2














No, there is no caching, as there is no such thing in the FTP protocol in general. TIdFTP deals only with live data.



Are you, perhaps, uploading binary files in ASCII mode? If so, that would alter line break characters (CR and LF) during transmission. That is a common mistake to make, since ASCII is FTP's default mode. Make sure you are setting the TIdFTP.TransferType property as needed before transferring a file. ASCII mode should only be used for text files, if used at all.



And FWIW, you may not need to download a file to verify its bytes. If the server supports any X<Hash> commands (where Hash can be SHA512, SHA256, SHA1, MD5, or CRC) , TIdFTP has VerifyFile() methods to use them. That calculates a hash of a local file and then compares it to a hash calculated by the server for a remote file. No transfer of file data is needed.






share|improve this answer
























  • Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

    – Paul
    Nov 24 '18 at 18:15














Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457990%2fis-indy-ftp-client-caching%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














No, there is no caching, as there is no such thing in the FTP protocol in general. TIdFTP deals only with live data.



Are you, perhaps, uploading binary files in ASCII mode? If so, that would alter line break characters (CR and LF) during transmission. That is a common mistake to make, since ASCII is FTP's default mode. Make sure you are setting the TIdFTP.TransferType property as needed before transferring a file. ASCII mode should only be used for text files, if used at all.



And FWIW, you may not need to download a file to verify its bytes. If the server supports any X<Hash> commands (where Hash can be SHA512, SHA256, SHA1, MD5, or CRC) , TIdFTP has VerifyFile() methods to use them. That calculates a hash of a local file and then compares it to a hash calculated by the server for a remote file. No transfer of file data is needed.






share|improve this answer
























  • Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

    – Paul
    Nov 24 '18 at 18:15


















2














No, there is no caching, as there is no such thing in the FTP protocol in general. TIdFTP deals only with live data.



Are you, perhaps, uploading binary files in ASCII mode? If so, that would alter line break characters (CR and LF) during transmission. That is a common mistake to make, since ASCII is FTP's default mode. Make sure you are setting the TIdFTP.TransferType property as needed before transferring a file. ASCII mode should only be used for text files, if used at all.



And FWIW, you may not need to download a file to verify its bytes. If the server supports any X<Hash> commands (where Hash can be SHA512, SHA256, SHA1, MD5, or CRC) , TIdFTP has VerifyFile() methods to use them. That calculates a hash of a local file and then compares it to a hash calculated by the server for a remote file. No transfer of file data is needed.






share|improve this answer
























  • Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

    – Paul
    Nov 24 '18 at 18:15
















2












2








2







No, there is no caching, as there is no such thing in the FTP protocol in general. TIdFTP deals only with live data.



Are you, perhaps, uploading binary files in ASCII mode? If so, that would alter line break characters (CR and LF) during transmission. That is a common mistake to make, since ASCII is FTP's default mode. Make sure you are setting the TIdFTP.TransferType property as needed before transferring a file. ASCII mode should only be used for text files, if used at all.



And FWIW, you may not need to download a file to verify its bytes. If the server supports any X<Hash> commands (where Hash can be SHA512, SHA256, SHA1, MD5, or CRC) , TIdFTP has VerifyFile() methods to use them. That calculates a hash of a local file and then compares it to a hash calculated by the server for a remote file. No transfer of file data is needed.






share|improve this answer













No, there is no caching, as there is no such thing in the FTP protocol in general. TIdFTP deals only with live data.



Are you, perhaps, uploading binary files in ASCII mode? If so, that would alter line break characters (CR and LF) during transmission. That is a common mistake to make, since ASCII is FTP's default mode. Make sure you are setting the TIdFTP.TransferType property as needed before transferring a file. ASCII mode should only be used for text files, if used at all.



And FWIW, you may not need to download a file to verify its bytes. If the server supports any X<Hash> commands (where Hash can be SHA512, SHA256, SHA1, MD5, or CRC) , TIdFTP has VerifyFile() methods to use them. That calculates a hash of a local file and then compares it to a hash calculated by the server for a remote file. No transfer of file data is needed.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 24 '18 at 16:28









Remy LebeauRemy Lebeau

344k19270464




344k19270464













  • Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

    – Paul
    Nov 24 '18 at 18:15





















  • Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

    – Paul
    Nov 24 '18 at 18:15



















Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

– Paul
Nov 24 '18 at 18:15







Thank you for your answer. There is nothing wrong with Indy or data being set. Customers just have very expensive, slow and unstable Internet connections by default and I have to put up with it. I am sending all the files in binary mode, even the text-based ones. I have to work with any FTP server. This time it is Pure-FTPd. Not all files are corrupted, but just about 5...7 of 1000...2000. There are skipped and unprintable characters right in the middle of XML. I will give a try to VerifyFile().

– Paul
Nov 24 '18 at 18:15






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457990%2fis-indy-ftp-client-caching%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()