For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > March 2006 > Autentication / Submission using LWP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Autentication / Submission using LWP
Adedayo Adeyeye

2006-03-23, 3:56 am

Hello,



I'm trying to make a submission via LWP to a cgi executable. However, this
executable requires authentication. The site on which it is hosted is set up
for integrated windows authentication. Below is a portion of my script:





my $browser = LWP::UserAgent->new( );

$browser->credentials(
'myserver.mydomain.com:80',
'/cgi-bin/folder/cgi.exe',
'myusername' => 'mypassword'
);

my $url = "http://myserver.mydomain.com/cgi-bin/folder/cgi.exe?$query";


my $response = $browser->post($url);





NB: $query represents the parameters that I want to submit after escaping
with uri_escape.



When I run my script, I get a HTTP Error 401.3 - Unauthorized: Access is
denied due to an ACL set on the requested resource.



Is Basic authentication the only authentication method supported?? Also,
this work on a similar server without authentication setup.



Kind regards























Adedayo Adeyeye

Netcom Africa Limited


Engineering

South Atlantic Petroleum Tower




7/F, 7 Adeola Odeku Street




Victoria Island, Lagos, Nigeria


a.adeyeye@netcomng.com

Tel:

234.1.461.1234


Skype: crownd

Fax:

234.1.461.1235


<http://www.netcomafrica.com/> http://www.netcomafrica.com

Mobile:

0802.501.3758













The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is addressed and others authorized to receive it. If you
are not the intended recipient you are hereby notified that any disclosure,
copying, distribution or taking action in reliance of the contents of this
information is strictly prohibited and may be unlawful. Kindly destroy this
message and notify the sender by replying the email in such instances. We do
not accept responsibility for any changes made to this message after it was
originally sent and any views, opinions, conclusions or other information in
this message which do not relate to the business of this firm or are not
authorized by us. Netcom is not liable neither for the proper and complete
transmission of the information contained in this communication nor any
delay in its receipt.












Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com