Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: HTTP::Daemon and SSL

by niemeand (Initiate)
on Nov 24, 2002 at 15:39 UTC ( [id://215508]=note: print w/replies, xml ) Need Help??


in reply to Re: HTTP::Daemon and SSL
in thread HTTP::Daemon and SSL

Hello. I've tried your hints by doing the changes of Daemon.pm and use my script but not with desired success. Has anyone perhaps sample-code for proxying client-requests with CONNECT-method to establish ssl and what additional changes have to do? I'll be very glad, if someone can post it here. Best regards, Andreas
my $UA = LWP::UserAgent->new; $UA->agent("Mozilla/4.0"); $UA->protocols_allowed(['http','https']); my $SRV = HTTP::Daemon->new(LocalPort => 3128); while (my $conn = $SRV->accept) { while (my $request = $conn->get_request) { my $resp = $UA->simple_request($request); $conn->send_response($resp); } $conn->close; }
Debugoutput in request to local webserver and https://www.nodeworks.com looks like:
LWP::UserAgent::send_request: GET http://127.0.0.1/ LWP::UserAgent::_need_proxy: Not proxied LWP::UserAgent::send_request: http URLs are among LWP::UserAgent=HASH( +0x1fe594)'s allowed protocols (http https) LWP::Protocol::http::request: () LWP::Protocol::collect: read 639 bytes LWP::Protocol::collect: read 817 bytes LWP::UserAgent::send_request: GET http://127.0.0.1/apache_pb.gif LWP::UserAgent::_need_proxy: Not proxied LWP::UserAgent::send_request: http URLs are among LWP::UserAgent=HASH( +0x1fe594)'s allowed protocols (http https) LWP::Protocol::http::request: () LWP::UserAgent::send_request: CONNECT http://www.nodeworks.com:443 LWP::UserAgent::_need_proxy: Not proxied LWP::UserAgent::send_request: http URLs are among LWP::UserAgent=HASH( +0x1fe594)'s allowed protocols (http https) LWP::Protocol::http::request: () LWP::UserAgent::send_request: CONNECT http://www.nodeworks.com:443 LWP::UserAgent::_need_proxy: Not proxied LWP::UserAgent::send_request: http URLs are among LWP::UserAgent=HASH( +0x1fe594)'s allowed protocols (http https) LWP::Protocol::http::request: ()

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://215508]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-23 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found