Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: W.Monsuwe [...] stater.nl
Cc:
AdminCc:

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



Subject: Bug #41642 - Newline strangeness - solution/patch
Date: Sun, 10 Oct 2010 15:22:15 +0200
To: <bug-libnet [...] rt.cpan.org>
From: "Monsuwé, Willem" <W.Monsuwe [...] stater.nl>
Hello, I have encountered a bug in Net::FTP, where blank lines are mangled when sent from a windows machine with ASCII transfer mode. This is the same as bug #41642, as far as I can tell, so I'm marking it with that bug number. As it turns out this problem is caused by the following line in Net::FTP::A.pm (line #80) $tmp =~ s/([^\015])\012/$1\015\012/sg if $nr; The capturing parens apparently capture the first \012 in a set of two consecutive ones, and the substitution therefore doesn't see it. The fix is to turn it into a negative lookbehind assertion, as so: $tmp =~ s/(?<!\015)\012/\015\012/sg if $nr; This changed has fixed the issue for me. A patch has been attached with this fix. Regards, Willem Monsuwe, Software engineer - Stater BV ***************************************************** This e-mail message and any files transmitted with it are confidential and intended exclusively for the addressee(s). No rights on Stater N.V. and/or any of its subsidiaries can be derived from this e-mail message. On services rendered by Stater N.V. and/or any of its subsidiaries, the general conditions as filed with the district court of Amsterdam, no. 112/2009, apply. Stater N.V. Number chamber of commerce: 32073618. This footnote also confirms that this e-mail message has been swept by Ironport for the presence of computer viruses. *****************************************************

Message body is not shown because sender requested not to inline it.

Subject: RE: [rt.cpan.org #62029] AutoReply: Bug #41642 - Newline strangeness - solution/patch
Date: Sun, 10 Oct 2010 15:54:48 +0200
To: <bug-libnet [...] rt.cpan.org>
From: "Monsuwé, Willem" <W.Monsuwe [...] stater.nl>
Hello, I just discovered a flaw in the patch I just submitted. The next line needs to be changed as well, as a negative lookbehind assertion will also fire at the first character of a line, as opposed to the original construct. Updated patch is attached. Regards, Willem Monsuwe Stater BV Show quoted text
-----Original Message----- From: Bugs in libnet via RT [mailto:bug-libnet@rt.cpan.org] Sent: Sunday, October 10, 2010 3:23 PM To: Monsuwé, Willem Subject: [rt.cpan.org #62029] AutoReply: Bug #41642 - Newline strangeness - solution/patch Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "Bug #41642 - Newline strangeness - solution/patch", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #62029]. Your ticket is accessible on the web at: https://rt.cpan.org/Ticket/Display.html?id=62029 Please include the string: [rt.cpan.org #62029] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-libnet@rt.cpan.org ------------------------------------------------------------------------- Hello, I have encountered a bug in Net::FTP, where blank lines are mangled when sent from a windows machine with ASCII transfer mode. This is the same as bug #41642, as far as I can tell, so I'm marking it with that bug number. As it turns out this problem is caused by the following line in Net::FTP::A.pm (line #80) $tmp =~ s/([^\015])\012/$1\015\012/sg if $nr; The capturing parens apparently capture the first \012 in a set of two consecutive ones, and the substitution therefore doesn't see it. The fix is to turn it into a negative lookbehind assertion, as so: $tmp =~ s/(?<!\015)\012/\015\012/sg if $nr; This changed has fixed the issue for me. A patch has been attached with this fix. Regards, Willem Monsuwe, Software engineer - Stater BV ***************************************************** This e-mail message and any files transmitted with it are confidential and intended exclusively for the addressee(s). No rights on Stater N.V. and/or any of its subsidiaries can be derived from this e-mail message. On services rendered by Stater N.V. and/or any of its subsidiaries, the general conditions as filed with the district court of Amsterdam, no. 112/2009, apply. Stater N.V. Number chamber of commerce: 32073618. This footnote also confirms that this e-mail message has been swept by Ironport for the presence of computer viruses. *****************************************************

Message body is not shown because sender requested not to inline it.

Thanks for the patch, now fixed in 1.24.