LWP With Privoxy

LWP doesn't seem to want to work through Privoxy (privoxy.org).
Privoxy is up and running fine through a normal browser and my script
works fine without Privoxy, but I can't get them working together.
Here is my code:

use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->proxy(['http', 'ftp'], "http://127.0.0.1:8118/"); # Privoxy
$req = new HTTP::Request GET => "http://anysite.com";
$res = $ua->request($req);
print $res->content;

.... which produces this:

500 Chunked must be last Transfer-Encoding 'identity'
jim_deadlock [ Mo, 30 April 2007 04:12 ] [ ID #1701630 ]

Re: LWP With Privoxy

Found the answer:

This turns out to be a bug in Privoxy. If you upgrade to the 3.0.5-
Beta version, the chunked problem goes away.


On Apr 30, 3:12 am, jim_deadlock <j... [at] deadlock.com> wrote:
> LWP doesn't seem to want to work through Privoxy (privoxy.org).
> Privoxy is up and running fine through a normal browser and my script
> works fine without Privoxy, but I can't get them working together.
> Here is my code:
>
> use LWP::UserAgent;
> $ua = new LWP::UserAgent;
> $ua->proxy(['http', 'ftp'], "http://127.0.0.1:8118/"); # Privoxy
> $req = new HTTP::Request GET => "http://anysite.com";
> $res = $ua->request($req);
> print $res->content;
>
> ... which produces this:
>
> 500 Chunked must be last Transfer-Encoding 'identity'
jim_deadlock [ Mo, 30 April 2007 07:36 ] [ ID #1701631 ]
Perl » comp.lang.perl.modules » LWP With Privoxy

Vorheriges Thema: Plans: New module for event registering and raising.
Nächstes Thema: ANNOUNCE: Google::Adwords v1.2.3