Thread LWP und proxy
(52 answers)
Opened by perl-snaks at 2012-04-25 13:04
Ich habe die beiden zeilen in meinem Skript hinzugefĆ¼gt sieht dann so aus:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #!C:\Perl\bin\Perl.exe -w print "Content-type:text/html\n\n"; use strict; use LWP::UserAgent; use LWP::Debug qw(+); my $pw='abcdefg'; my $us='123456'; my $url = "https://xyz.server.eu/lala.php"; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->requests_redirectable(undef); # Redirects ausschalten! $ua->credentials("++++.******.de:443", "Realname", $us, $pw); $ua->add_handler("request_send", sub { shift->dump; return }); $ua->add_handler("response_done", sub { shift->dump; return }); my $response = $ua->post($url,[0=>0]); print $response->status_line; print $response->decoded_content; und bekomme die fhlermeldung: Code: (dl
)
1 Content-type:text/html Last edited: 2012-05-31 13:19:55 +0200 (CEST) |