Dear Tech Readers,

In ftp command -w is available, very useful for crappy networks.
pkg_add does not have any of this.

The HTTP layer is not configuring Timeout.
( in /usr/libdata/perl5/OpenBSD/./PackageRepository/HTTP.pm )
        my $o = IO::Socket::INET->new(
                PeerHost => $host,
                PeerPort => $port);
( plenty of option here like MultiHomed or Timeout, ReuseAddr, blocking )

Nor using an nonblocking Read later

sub get_header
{
        my $o = shift;
        my $l = $o->getline;
        if ($l !~ m,^HTTP/1\.1\s+(\d\d\d),) {

Most usage may be used in FTP so none notice so far.

SCP and FTP are done with the actual binary, ftp handle http well and
is ready to get an option for crappy network.

Maybe a patch can add a '-w' to pkg_add and push it there :

sub ftp_cmd
{
        my $self = shift;
        return $self->SUPER::ftp_cmd." -S session=/dev/fd/".fileno($self->{fh});
}

And use this for all transfer ?

Or is the user supposed to manage this out of the pkg_add tool.

I can propose a patch if not *

Best.

-- 
--
---------------------------------------------------------------------------------------------------------------------
Knowing is not enough; we must apply. Willing is not enough; we must do

Reply via email to