From: plobbes Date: Thu, 22 Mar 2007 16:50:51 +0000 (+0000) Subject: - update https_get and https_post: now set headers for LWP / Crypt::SSLeay X-Git-Tag: BUSINESS_ONLINEPAYMENT_3_00_07~1 X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment.git;a=commitdiff_plain;h=539664e913f52544a705dcbdaee19c8ef10d38e7 - update https_get and https_post: now set headers for LWP / Crypt::SSLeay --- diff --git a/OnlinePayment/HTTPS.pm b/OnlinePayment/HTTPS.pm index ec01b70..3154297 100644 --- a/OnlinePayment/HTTPS.pm +++ b/OnlinePayment/HTTPS.pm @@ -155,7 +155,10 @@ sub https_get { unless $self->port == 443; $url .= "/$path"; - my $ua = new LWP::UserAgent; + my $ua = new LWP::UserAgent; + foreach my $hdr ( keys %headers ) { + $ua->default_header( $hdr => $headers{$hdr} ); + } my $res = $ua->request( GET($url) ); ( @@ -258,6 +261,9 @@ sub https_post { } my $ua = new LWP::UserAgent; + foreach my $hdr ( keys %headers ) { + $ua->default_header( $hdr => $headers{$hdr} ); + } my $res; if ( ref($post_data) ) {