diff options
author | Graham Barr <gbarr@pobox.com> | 2005-08-01 22:49:33 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2009-02-24 10:40:46 -0600 |
commit | 35c01301914f4e4c8f8370ed37477dc6efd910f5 (patch) | |
tree | 3fb111499c5ff6398e8b347e0c0b913af7467dc0 | |
parent | b2ce2337b0b3cb940fea08526fd484314066c370 (diff) | |
download | perl-libnet-35c01301914f4e4c8f8370ed37477dc6efd910f5.tar.gz |
Try upper and lower USER command
-rw-r--r-- | Net/FTP.pm | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -22,7 +22,7 @@ use Net::Config; use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC); # use AutoLoader qw(AUTOLOAD); -$VERSION = "2.76"; +$VERSION = '2.77'; @ISA = qw(Exporter Net::Cmd IO::Socket::INET); # Someday I will "use constant", when I am not bothered to much about @@ -1217,11 +1217,21 @@ sub _STOR { shift->command("STOR",@_)->response() == CMD_INFO } sub _STOU { shift->command("STOU",@_)->response() == CMD_INFO } sub _RNFR { shift->command("RNFR",@_)->response() == CMD_MORE } sub _REST { shift->command("REST",@_)->response() == CMD_MORE } -sub _USER { shift->command("user",@_)->response() } # A certain brain dead firewall :-) sub _PASS { shift->command("PASS",@_)->response() } sub _ACCT { shift->command("ACCT",@_)->response() } sub _AUTH { shift->command("AUTH",@_)->response() } +sub _USER { + my $ftp = shift; + my $ok = $ftp->command("USER",@_)->response(); + + # A certain brain dead firewall :-) + $ok = $ftp->command("user",@_)->response() + unless $ok == CMD_MORE or $ok == CMD_OK; + + $ok; +} + sub _SMNT { shift->unsupported(@_) } sub _MODE { shift->unsupported(@_) } sub _SYST { shift->unsupported(@_) } |