Reversing this part of the lib/LWP/Protocol/http.pm patch lets it work:
http://search.cpan.org/diff?from=libwww-perl-5.810&to=libwww-perl-
5.811&w=1#lib/LWP/Protocol/http.pm
- # XXX need to watch out for write timeouts
- my $n = $socket->syswrite($req_buf, length($req_buf));
- die $! unless defined($n);
- die "short write" unless $n == length($req_buf);
- #LWP::Debug::conns($req_buf);
- $req_buf = "";
+ do {
+ # Since this just writes out the header block it should almost
+ # always succeed to send the whole buffer in a single write call.
+ my $n = syswrite($socket, $req_buf, length($req_buf));
+ unless (defined $n) {
+ redo if $!{EINTR};
+ if ($!{EAGAIN}) {
+ select(undef, undef, undef, 0.1);
+ redo;
+ }
+ die "write failed: $!";
+ }
+ if ($n) {
+ substr($req_buf, 0, $n, "");
+ }
+ else {
+ select(undef, undef, undef, 0.5);
+ }
+ }
+ while (length $req_buf);
}