[ 
https://issues.apache.org/jira/browse/CAMEL-26984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-26984 started by Federico Mariani.
------------------------------------------------
> camel-ftp: a directory listing refused by the server (e.g. PORT refused in 
> active mode) is treated as an empty directory, nothing is logged
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26984
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26984
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 4.18.5, 4.22.2, 4.23.0
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> In active mode (the default) a server or firewall that refuses the data 
> connection, e.g. {{PORT}} answered with {{501 PORT is disabled.}}, makes 
> commons-net return an empty listing without sending {{LIST}}. The FTP 
> consumer takes it as an empty directory: every poll succeeds with 0 files, 
> nothing is logged, and the files stay on the server.
> Reproduction: an FTP server with active mode disabled and a file in {{inbox}}:
> {code:java}
> from("ftp://admin@localhost:21/inbox?password=admin";).to("mock:result"); // 
> receives nothing, no WARN
> {code}
> The same route with {{passiveMode=true}} consumes the file.
> Expected: the poll fails with a {{GenericFileOperationFailedException}} 
> carrying the reply code and text (here 501), so the poll strategy logs it, 
> with a hint to try {{passiveMode=true}}. Replies 450 and 550 (missing or 
> empty directory) keep giving an empty listing.
> _Claude Code on behalf of Federico Mariani_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to