KeepAliveDuringTransfer throws FtpException after 2 NOOP commands

0 votes
asked Jan 7, 2011 by Chris (150 points)
edited Jan 9, 2011

First off, I am currently using build 3.0.3428. I am testing against a local FileZilla FTP server throttled to 10 KB/s.

Before I renew my license I'm trying to determine whether or not this issue has been resolved in the newer releases.

I am trying to use FtpOptions.KeepAliveDuringTransfer to enable periodic NOOPs on the control stream to keep a connection open. This works fine for the first NOOP command but after the second one it throws an FtpException with an error message of "OK (200)".

I believe the issue is in the Rebex.Net.FtpDownloadStream.ProcessResponse method, specifically where it's checking for a base._response.Group != 1 the first time. If I'm understanding the way this works properly, the group is in fact 2 from the OK 200 response returned by the NOOP, but this is causing the code to throw an exception where I don't think it should.

Am I doing something wrong here or is this an actual bug that has been resolved in a newer version?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Jan 9, 2011 by Lukas Pokorny (120,490 points)
edited Jan 9, 2011
 
Best answer

This particular NOOP response ("200 OK") was not properly understood on Rebex FTP 3.0.3428 (it has to distinguish NOOP responses from RETR/STOR responses, which is quite tricky).

This has been resolved in version 3.0.3793 - since this build, Rebex FTP supports this NOOP response as well and the exception should no longer occur.

commented Jan 10, 2011 by Chris (150 points)
Based on your response I just renewed my license and got the latest version and it does indeed appear to work properly now!
commented Jan 10, 2011 by Lukas Pokorny (120,490 points)
Thanks for renewing, I'm glad it works fine now!
...