Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 7681
Status: resolved
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: egon.berg [...] fuchs-europe.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.19
Fixed in: (no value)



Subject: Problem with cr/lf translation
Hi, I have found a bug with the cr/lf translation. I am running perl in cygwin environment und win2000. If I transfer a file which has already cr/lf this will be sometimes translated to cr/cr/lf. This happens allways at the border of a transfer block, the last byte of the block is cr and the first byte of the next block lf, wich will be translated to cr/lf. I have seen in the changelog that this problem should be already fixed, but it isn't. The change was made to Net::FTP::cmd->datasend but this routine wouldn't used for sending data(?!). The problem is in Net::FTP::A->write. To fix this problem I have added the following line Show quoted text
>>chop $tmp if substr($tmp, -1) eq "\015";<< after the line with the cr/lf translation. For now its looks OK. But I am a perl beginner and know not much about ftp internals.
Greetings Egon
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #7681] Problem with cr/lf translation
Date: Fri, 17 Sep 2004 15:59:06 +0100
To: bug-libnet [...] rt.cpan.org
RT-Send-Cc:
On 17 Sep 2004, at 13:43, Guest via RT wrote: Show quoted text
> I have found a bug with the cr/lf translation. I am running perl in > cygwin environment und win2000. If I transfer a file which has already > cr/lf this will be sometimes translated to cr/cr/lf. This happens > allways at the border of a transfer block, the last byte of the block > is cr and the first byte of the next block lf, wich will be translated > to cr/lf. I have seen in the changelog that this problem should be > already fixed, but it isn't. The change was made to > Net::FTP::cmd->datasend but this routine wouldn't used for sending > data(?!). The problem is in Net::FTP::A->write. To fix this problem I > have added the following line
>>> chop $tmp if substr($tmp, -1) eq "\015";<< after the line with the >>> cr/lf translation. For now its looks OK. But I am a perl beginner >>> and know not much about ftp internals.
Please confirm that you are running the latest version of Net::FTP::A, which is 1.16. You can check with $ perl -e "use Net::FTP::A 99" Net::FTP::A version 99 required--this is only version 1.16 at -e line 1. BEGIN failed--compilation aborted at -e line 1. Net::FTP::A version 1.16 is in the libnet-1.19 distribution. Graham.
From: egon:berg [...] fuchs-europe.de
Hi, I have installed libnet Version 1.19. Runnung the check on Net::FTP:A shows that it is Version 1.16. Egon
From: Graham Barr <gbarr [...] pobox.com>
Subject: Re: [cpan #7681] Problem with cr/lf translation
Date: Mon, 27 Sep 2004 11:34:51 +0100
To: bug-libnet [...] rt.cpan.org
RT-Send-Cc:
On 20 Sep 2004, at 07:50, Guest via RT wrote: Show quoted text
> Hi, > I have installed libnet Version 1.19. Runnung the check on Net::FTP:A > shows that it is Version 1.16.
Please try this version of A.pm http://svn.mutatus.co.uk/repos/libnet/trunk/Net/FTP/A.pm I have not had a chance to fully test this yet, but I think it should do what you need. Please let me know your results Graham.
From: egon.berg [...] fuchs-europe.de
[gbarr@pobox.com - Mon Sep 27 06:34:20 2004]: Show quoted text
> On 20 Sep 2004, at 07:50, Guest via RT wrote:
> > Hi, > > I have installed libnet Version 1.19. Runnung the check on
Net::FTP:A Show quoted text
> > shows that it is Version 1.16.
> > Please try this version of A.pm > > http://svn.mutatus.co.uk/repos/libnet/trunk/Net/FTP/A.pm > > I have not had a chance to fully test this yet, but I think it
should Show quoted text
> do what you need. > > Please let me know your results > > Graham. >
I have tested the new version and it works fine. The sourcecode also looks O.K. thanks Egon