diff options
author | franck cuny <franck@lumberjaph.net> | 2009-05-18 11:42:50 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2009-05-18 11:42:50 +0200 |
commit | 43d5d698e2f3fb06fec85aa45cc22d2aecd15e6d (patch) | |
tree | e69d757ab3d52f80e483076e0719288d732a05ad | |
parent | import version 1.04 (diff) | |
download | lwpx-paranoidagent-43d5d698e2f3fb06fec85aa45cc22d2aecd15e6d.tar.gz |
applying RUZ patch http://rt.cpan.org/Public/Bug/Display.html?id=41946
-rw-r--r-- | lib/LWPx/ParanoidAgent.pm | 8 | ||||
-rw-r--r-- | lib/LWPx/Protocol/http_paranoid.pm | 4 |
2 files changed, 0 insertions, 12 deletions
diff --git a/lib/LWPx/ParanoidAgent.pm b/lib/LWPx/ParanoidAgent.pm index bbd0d77..0db4380 100644 --- a/lib/LWPx/ParanoidAgent.pm +++ b/lib/LWPx/ParanoidAgent.pm @@ -243,7 +243,6 @@ sub send_request return _new_response($request, &HTTP::Status::RC_BAD_REQUEST, "Only http and https are supported by ParanoidAgent") unless $scheme eq "http" || $scheme eq "https"; - LWP::Debug::trace("$method $url"); my $protocol; @@ -253,22 +252,18 @@ sub send_request my $x; if($x = $self->protocols_allowed) { if(grep lc($_) eq $scheme, @$x) { - LWP::Debug::trace("$scheme URLs are among $self\'s allowed protocols (@$x)"); } else { - LWP::Debug::trace("$scheme URLs aren't among $self\'s allowed protocols (@$x)"); require LWP::Protocol::nogo; $protocol = LWP::Protocol::nogo->new; } } elsif ($x = $self->protocols_forbidden) { if(grep lc($_) eq $scheme, @$x) { - LWP::Debug::trace("$scheme URLs are among $self\'s forbidden protocols (@$x)"); require LWP::Protocol::nogo; $protocol = LWP::Protocol::nogo->new; } else { - LWP::Debug::trace("$scheme URLs aren't among $self\'s forbidden protocols (@$x)"); } } # else fall thru and create the protocol object normally @@ -380,16 +375,13 @@ sub _need_proxy if (my $host = eval { $url->host }) { for my $domain (@{ $self->{'no_proxy'} }) { if ($host =~ /\Q$domain\E$/) { - LWP::Debug::trace("no_proxy configured"); return; } } } } - LWP::Debug::debug("Proxied to $proxy"); return $HTTP::URI_CLASS->new($proxy); } - LWP::Debug::debug('Not proxied'); undef; } diff --git a/lib/LWPx/Protocol/http_paranoid.pm b/lib/LWPx/Protocol/http_paranoid.pm index e45fa1e..0d00b6f 100644 --- a/lib/LWPx/Protocol/http_paranoid.pm +++ b/lib/LWPx/Protocol/http_paranoid.pm @@ -5,7 +5,6 @@ package LWPx::Protocol::http_paranoid; use strict; -require LWP::Debug; require HTTP::Response; require HTTP::Status; require Net::HTTP; @@ -124,7 +123,6 @@ sub hlist_remove { sub request { my($self, $request, $proxy, $arg, $size, $timeout) = @_; - LWP::Debug::trace('()'); # paranoid: now $timeout means total time, not just between bytes coming in. # avoids attacker servers from tarpitting a service that fetches URLs. @@ -209,7 +207,6 @@ sub request 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); } my($code, $mess, @junk); @@ -373,7 +370,6 @@ sub request if (($peer_http_version eq "1.1" && !$connection{close}) || $connection{"keep-alive"}) { - LWP::Debug::debug("Keep the http connection to $host:$port"); $conn_cache->deposit("http", "$host:$port", $socket); } } |