commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiroki Taniura (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NET-597) FTP fails to parse listings for Solaris 10 FTPd in Japanese
Date Thu, 28 Jul 2016 02:35:20 GMT

    [ https://issues.apache.org/jira/browse/NET-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15396806#comment-15396806
] 

Hiroki Taniura commented on NET-597:
------------------------------------

Thank you so much for fixing it. It works with "-e EUC-JP".
However, I have 2 reasons why I accepted aribitary suffix in the attached patch.

1. Other languages
I don't know other languages, but some languages might have such suffix as well.

2. Control encoding
Wrong control encoding usually results in broken filenames and users realize they have to
change encoding.
However, in this case files are not listed at all and users might think there are no files.

> FTP fails to parse listings for Solaris 10 FTPd in Japanese
> -----------------------------------------------------------
>
>                 Key: NET-597
>                 URL: https://issues.apache.org/jira/browse/NET-597
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.4, 3.5
>         Environment: Server: Solaris 10 Japanese
> Client: Windows 7
>            Reporter: Hiroki Taniura
>            Priority: Minor
>         Attachments: ParseJapanese.patch
>
>
> Commons Net lists no files for Solaris 10 FTPd (or WU-FTPD) when the server language
is Japanese.
> Here is the result of the sample client.
> {panel}
> java -jar commons-net-examples-3.5.jar FTPClientExample -l 192.168.2.160 root password
> 220 unknown FTP server ready.
> Connected to 192.168.2.160 on 21
> USER *******
> 331 Password required for root.
> PASS *******
> 230 User root logged in.
> SYST
> 215 UNIX Type: L8 Version: SUNOS
> Remote system is UNIX Type: L8 Version: SUNOS
> TYPE A
> 200 Type set to A.
> PASV
> 227 Entering Passive Mode (192,168,2,160,235,174)
> LIST
> 150 Opening ASCII mode data connection for /bin/ls.
> 226 Transfer complete.
> NOOP
> 200 NOOP command successful.
> QUIT
> 221-You have transferred 0 bytes in 0 files.
> 221-Total traffic for this session was 3426 bytes in 1 transfers.
> 221-Thank you for using the FTP service on unknown.
> 221 Goodbye.
> {panel}
> I identified the cause in the source code. I'm attaching a patch later.
> On Japanese Solaris 10, the result of "ls -l" is like below;
> {panel}
> drwxrwxrwt  10 root     sys          875  7月  7日  14:18 tmp
> drwxr-xr-x  40 root     sys         1024  6月 13日 2014年 usr
> drwxr-xr-x  47 root     sys         1024  6月 13日 2014年 var
> dr-xr-xr-x   6 root     root         512  2月 25日  15:11 vol
> {panel}
> As you can see, the timestamp has the postfixes of "month", "date", and "year" in Japanese.
> The current REGEX of UnixFTPEntryParser doesn't work for it because of the Japanese postfixes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message