CC: | 560867-submitter [...] bugs.debian.org, 560867 [...] bugs.debian.org |
Subject: | can't write to remote files lines longer than 32748 chars |
Date: | Mon, 28 Jun 2010 22:14:14 +0200 |
To: | bug-Net-SSH2 [...] rt.cpan.org |
From: | Salvatore Bonaccorso <salvatore.bonaccorso [...] gmail.com> |
Hi
Running the following small script hangs, when sending 32748 chars, if
one CTRL-C's the files get written anyway. Sending only 32747 chars
works on the other hand side well.
---(example)------------------------------------------------------------
#!/usr/bin/perl -W
use strict;
use Fcntl;
use warnings FATAL => qw (all);
use Net::SSH2;
my $ssh2 = Net::SSH2->new();
$ssh2->debug(1);
$ssh2->connect('hostname') or die $!;
$ssh2->auth_password('username','password');
my $sftp = $ssh2->sftp();
my $remote = $sftp->open("/home/username/foo.txt", O_WRONLY | O_CREAT | O_TRUNC);
print $remote 'A' x 32748;
------------------------------------------------------------------------
This was orginally in Debian a bugreport with 27442 chars, but I was
not able to reproduce. I'm now with 32748. See for details [1].
[1] http://bugs.debian.org/560867
Any ideas about that?
Bests
Salvatore
Message body not shown because it is not plain text.