diff options
author | Graham Barr <gbarr@pobox.com> | 2003-05-20 10:54:52 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2003-05-20 10:54:52 +0000 |
commit | 31b6a7d89c51d48b95f1c0a772d5cd6fc9655fcb (patch) | |
tree | 1ebb8e56d9b6d13888c7b5d2e0ba49c5f51d703b | |
parent | b00e7de340d12567ca0ede1ba09a10df17603182 (diff) | |
download | perl-libnet-31b6a7d89c51d48b95f1c0a772d5cd6fc9655fcb.tar.gz |
Net::FTP::A
- Fix CRLF translation in write()
-rw-r--r-- | Net/FTP/A.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Net/FTP/A.pm b/Net/FTP/A.pm index 764e915..d068828 100644 --- a/Net/FTP/A.pm +++ b/Net/FTP/A.pm @@ -1,4 +1,4 @@ -## $Id: //depot/libnet/Net/FTP/A.pm#16 $ +## $Id: //depot/libnet/Net/FTP/A.pm#17 $ ## Package to read/write on ASCII data connections ## @@ -10,7 +10,7 @@ use Carp; require Net::FTP::dataconn; @ISA = qw(Net::FTP::dataconn); -$VERSION = "1.15"; +$VERSION = "1.16"; sub read { my $data = shift; @@ -71,7 +71,7 @@ sub write { my $size = shift || croak 'write($buf,$size,[$timeout])'; my $timeout = @_ ? shift : $data->timeout; - (my $tmp = substr($buf,0,$size)) =~ s/\n/\015\012/sg; + (my $tmp = substr($buf,0,$size)) =~ s/\r?\n/\015\012/sg; # If the remote server has closed the connection we will be signal'd # when we write. This can happen if the disk on the remote server fills up |