On Tue, 19 Nov 2002 22:52:23 +1100, [EMAIL PROTECTED] (Wenjie Wang\) wrote:
>Greetings, > >I'm a C++ programmer and It's my first attempt to code in perl. > >I'm behind a firewall and access WWW via a proxy server. I got no problem to >GET a request from a web site by using LWP::UserAgent, if I have the correct >proxy setting. I tried to do it in a similar way with POST request, but >failed. > >What I've done is: >-----------------------------8<--------------------- >use HTTP::Request::Common qw(POST); >use LWP::UserAgent; > >$ua = new LWP::UserAgent; >$ua->proxy (['http'] => 'http://123.123.123.134:ppp'); >$ua->proxy (['https'] => 'http://123.123.123.134:ppp'); > >my $req = POST 'https://www.somesite.com/somefile.asp', > [ LoginName => mylogin, Password => mypassword ]; >print $ua->request($req)->as_string; >-----------------------------8<--------------------- > >The request is returned successfully(HTTP/1.0 200 OK), but complains "No >Server". > >I suspect it's something wrong with my proxy. Could someone point me to the >right direction on how to deal with proxy server and HTTPS site? Maybe your LWP isn't able to use https, do you have Crypt::SSLeay installed? The are a couple of modules which LWP can use to enable SSL for itself. Crypt::SSLeay is one, and I think the other is IO::Socket::SSL. Read the README.SSL file in the libwww-perl module bundle. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]