I tried to put a file through my proxy server.  I sent the header
information, but before I could begin sending data, the proxy server closed
my connection with the error "proxy authorization needed."

This patch will accommodate this behavior.

 <<patch.txt>> 

**********************************************************************
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
************************************************************************
*** /sw/gcm/perl5/lib/site_perl/LWP/Protocol/http.pm    Wed Apr  5 17:57:35 2000
--- http.pm     Wed May 17 12:29:31 2000
***************
*** 211,234 ****
        $n = $socket->syswrite($buf, length($buf));
        die $! unless defined($n);
        die "short write" unless $n == length($buf);
        LWP::Debug::conns($buf);
  
!       if ($ctype eq 'CODE') {
!         while ( ($buf = &$cont_ref()), defined($buf) && length($buf)) {
            die "write timeout" if $timeout && !$sel->can_write($timeout);
!           $n = $socket->syswrite($buf, length($buf));
            die $! unless defined($n);
!           die "short write" unless $n == length($buf);
            LWP::Debug::conns($buf);
          }
!       } elsif (defined($$cont_ref) && length($$cont_ref)) {
!         die "write timeout" if $timeout && !$sel->can_write($timeout);
!         $n = $socket->syswrite($$cont_ref, length($$cont_ref));
!         die $! unless defined($n);
!         die "short write" unless $n == length($$cont_ref);
!         LWP::Debug::conns($buf);
        }
  
        # read response line from server
        LWP::Debug::debug('reading response');
        
--- 211,246 ----
        $n = $socket->syswrite($buf, length($buf));
        die $! unless defined($n);
        die "short write" unless $n == length($buf);
        LWP::Debug::conns($buf);
  
!       eval {
!         if ($ctype eq 'CODE') {
!           while ( ($buf = &$cont_ref()), defined($buf) && length($buf)) {
!             die "write timeout" if $timeout && !$sel->can_write($timeout);
!             $n = $socket->syswrite($buf, length($buf));
!             die $! unless defined($n);
!             die "short write" unless $n == length($buf);
!             LWP::Debug::conns($buf);
!           }
!         } elsif (defined($$cont_ref) && length($$cont_ref)) {
            die "write timeout" if $timeout && !$sel->can_write($timeout);
!           $n = $socket->syswrite($$cont_ref, length($$cont_ref));
            die $! unless defined($n);
!           die "short write" unless $n == length($$cont_ref);
            LWP::Debug::conns($buf);
          }
!       };
!       local($SIG{__DIE__});
!       if ($@) {
!         $timeout=2;
!         print "Write failed: $@\n";
!         my $write_failure = $@;
!         $SIG{__DIE__} = sub {
!           print "Should die $_[0], but instead dieing $write_failure";
!           die $write_failure;
!         };
        }
  
        # read response line from server
        LWP::Debug::debug('reading response');
        

Reply via email to