I'm sorry, but this script did NOT work yesterday. If this was the script that was run, then it has been changed. In the script you post you never use HTTP::proxy::HeaderFilter::simple;
The simple addition of that line will make it work. See the difference:
Your version
#!/usr/bin/perl
use HTTP::proxy;
my $proxy = HTTP::Proxy->new;
$proxy->push_filter(
mime => undef,
request => HTTP::Proxy::HeaderFilter::simple->new(
sub { $_[0]->remove_header(qw( User-Agent From Referer Coo
+kie )) },
),
response => HTTP::Proxy::HeaderFilter::simple->new(
sub { $_[0]->remove_header(qw( Set-Cookie )); },
)
);
C:\tmp>ht.pl
C:\tmp>ht.pl
Can't locate object method "new" via package "HTTP::Proxy::HeaderFilte
+r::simple"
(perhaps you forgot to load "HTTP::Proxy::HeaderFilter::simple"?) at
+C:\tmp\ht.
pl line 14.
Now, using the use statement
#!/usr/bin/perl
use HTTP::proxy;
use HTTP::proxy::HeaderFilter::simple; # added use statement
my $proxy = HTTP::Proxy->new;
$proxy->push_filter(
mime => undef,
request => HTTP::Proxy::HeaderFilter::simple->new(
sub { $_[0]->remove_header(qw( User-Agent From Referer Coo
+kie )) },
),
response => HTTP::Proxy::HeaderFilter::simple->new(
sub { $_[0]->remove_header(qw( Set-Cookie )); },
)
);
C:\tmp>ht.pl
C:\tmp>
And what do you know, it works!
I know you aren't going to listen to this because others have said the same thing and you haven't listened to them, but you really do need to make the effort to learn how to debug program and research your own issues. You show no effort that you have researched any of the posts you make. If that is how you want to proceed and others want to continue assisting you, that is fine. But as for me, this is the last assistance I will give until I see that you have made an effort to solve the problem yourself before you post.
davidj
|