Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LWP::UserAgent SSL problem

Status
Not open for further replies.

fortytwo

Technical User
Apr 18, 2000
206
GB
Hello,

I have a problem with LWP::UserAgent. I am running some performance tests on a site that uses SSL. I have Crypt::SSLeay installed and this is pretty much the code fragment I am using to make the requests:
[tt]
$url = '$ua = LWP::UserAgent->new();
$ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave => 1));
$ua->agent('WebSuck/v0.1');
$req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-$req->content('parameter=value');
$req->referer('$response = $ua->request($req);
[/tt]
Unfortunatly one part of the site that I need to access needs a cookie set in another part of the site. This works fine when not using SSL, the cookie jar updates normally, however when making the request over SSL no cookies are saved. There is no error returned, just no cookies. Has anyone else come across this problem, and is there a solution?

Many thanks
Will.
fortytwo
will@hellacool.co.uk
 
I heard somewhere that you can set -Secured option while you make a cookie
 
jvdboom, this is not about *setting* cookies, rather accepting and storing them when using the LWP library to fetch webpages.
fortytwo
will@hellacool.co.uk
 
The -secure option was ment to only let it read by SSL.But I don't think that's the problem here. Unfortunality I haven't use LWP::Useragent yet to fetch cookies or SSL so I can't help you much.
Have you already tried to creare/fetch cookies with SSL using the common way? Have you read an RFC about SSL?
 
Script for broker reciprocity help...
I am doing a site and I want to be able to access the local Multiple Listing Service from the site. There is a basic script that is given which has to be modified. Problem is I am not familiar with scripting at all! I don't know where to put what or how I need to modify the script in order for it to work with my website. I was wondeing if anyone had any experience in this department and could help point m in the right direction.
Thanks for any help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top