The basic and perhaps often seen scriptlet looks like
my $UA = LWP::UserAgent->new; $UA->agent("Mozilla/4.0"); $UA->protocols_allowed(['http','https']); my $SRV = HTTP::Daemon->new(LocalPort => 3128); print "Please contact me at: <URL:", $SRV->url, ">\n"; while (my $conn = $SRV->accept) { while (my $request = $conn->get_request) { my $resp = $UA->simple_request($request); $conn->send_response($resp); } $conn->close; }
my $req = new HTTP::Request('GET', 'https://www.nodeworks.com');
or get one about the HTTP::Daemonmy $req = new HTTP::Request('CONNECT', 'http://www.nodeworks.com:443');
, only the first one works.
I've read something about patching the Daemon, other people choose the way to patch http.pm - Modules, but nothing seems to work.
What is to do now, or what do I wrong? I don't want low level programming, if anyone has samplecode, please post it.
Here are some Postings, I've studied and tried them out.
If we get it to work, perhaps we should write a small howto; during my inquest I found many people who was in the same situation with no satisfactory solution.
http://www.byte.com/documents/s=493/byt20010214s0005/index3.htm
http://www.perlmonks.org/index.pl?node_id=179922
http://groups.google.de/groups?q=perl+SSL+HTTP::Daemon&hl=de&lr=&ie=UTF-8&selm=3CB9EFAF.80809%40computer.org&rnum=1
Thanks in advance and
best regards,
Andreas
In reply to LWP, Proxy, SSL by niemeand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |