Details
Description
According to the ftplet API documentation, the onSite() method is described thus:
– PASTE –
This is SITE command start notification method. It gives a chance to implement custom SITE command. If this method returns SKIP or DISCONNECT, the existing SITE commands will not be executed.
– PASTE –
But the onSite() method is only called inside the DefaultFtplet.afterCommand() method which means that the custom SITE command issued by the user always tries to be processed by the server, resulting in a "502 - Command SITE not implemented for xxx" message being displayed to the user even though the custom command is executed. Furthermore, returning FTPletResult.SKIP after processing the custom code to prevent further processing of the request by the server has no effect. For the onSite() method to work as per the documentation, it would have to be called in the beforeCommand() function.
I can create sample code for clarification if you like.