Questions tagged [lwp-useragent]

The LWP::UserAgent is a class implementing a web user agent in the libwww-perl library.

The LWP::UserAgent is a class implementing a web user agent in the libwww-perl library by Michael Schilli. This class provides the option to setup various configuration options when making HTTP requests, allowing control over headers, cookies, credentials, protocols, proxies and many others.

For example, using a combination of these settings allow the request sender to pretend he is a certain user with certain characteristics - for example, a Windows user that uses Mozilla Firefox 19.0, has certain cookies in his browser and has obtained HTTP auth credentials.

225 questions
0
votes
1 answer

Error: 500 Can't connect to foo.com:443 ( unknown errorerror:140773F2:SSL routines:SSL23_GET_SERVER_HELLO:sslv3)

I am using LWP::UserAgent version 6.03 to fetch the status of website. my $ua = LWP::UserAgent->new(ssl_opts => {verify_hostname => 0},); $ua->cookie_jar({}); $ua->agent('Mozilla/5.0'); push @{$ua->requests_redirectable}, 'POST'; push…
made_in_india
  • 2,109
  • 5
  • 40
  • 63
0
votes
1 answer

LWP::UserAgent proxy in Perl session

I need to change the proxy server in one Perl run (process). But LWP::UserAgent is always remembering the first proxy value. When I start my program with proxy x.x.x.2, this address is always used as proxy. What is wrong? The simple program…
perLHawk
  • 90
  • 7
0
votes
1 answer

CGI script communication

I have two CGI scripts written in Perl and I want to implement the following communication sequence between the two. Script A sends a POST request to script B, it should then wait for B to perform some type of validation by querying a Database, then…
user1845360
  • 847
  • 2
  • 12
  • 29
0
votes
3 answers

500 error with LWP:UserAgent

Solved ! thanks for every help i had :) Found http://stackoverflow.com/questions/8026524/how-do-i-force-lwp-to-use-cryptssleay-for-https-requests and solved my issue with use Net::SSL (); # From Crypt-SSLeay BEGIN { $Net::HTTPS::SSL_SOCKET_CLASS =…
squale
  • 35
  • 1
  • 7
0
votes
1 answer

How to set 'grant type' with lwp

I'm trying to connect to a server with LWP::UserAgent. I have succeeded to do anonymous searches with LWP::UserAgent on that same server, but now I have to "secret" stuff and that requires to use authentication on that server. I have used the…
TeeVee
  • 21
  • 1
0
votes
1 answer

How to make all requests go to a "front controller" in perl

I'm making an application in perl for the first time, and wanted to use a front controller approach where all requests go through one script which delegates what pages to load based on the uri. what my script looks like: use LWP::UserAgent; use…
a7omiton
  • 1,597
  • 4
  • 34
  • 61
0
votes
1 answer

Why is the server returned the result for a different submit than selected by perl HTML::Form and LWP::UserAgent?

I want to process a number of files with http://2struc.cryst.bbk.ac.uk/twostruc; to automate this I wrote a perl script using perl's HTML::Form. This server has a two step submit process: first, upload a file or enter an id; second, select the…
user3141592
  • 121
  • 1
  • 10
0
votes
1 answer

Issue while authorizing a web page using LWP perl

I am trying to login into an URL using LWP perl My URL open ups with a pop up asking for username and password.When I try to manually log in ,it succeeds but through LWP,I am getting 401 error my ($url) = @_; my $ua = LWP::UserAgent->new( keep_alive…
Sammidbest
  • 463
  • 2
  • 10
  • 20
0
votes
1 answer

Using LWP::UserAgent to retrieve MRTG Graph in Perl

I am trying to retrieve an MRTG graph using Perl in Linux environment . #!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use Data::Dumper; my $ua = LWP::UserAgent->new; $ua->timeout(10); my $response =…
Newbie
  • 2,664
  • 7
  • 34
  • 75
0
votes
1 answer

HTTP POST request for JSON in Perl

I'm trying to configure the wireless settings (like setting ssid as "vinoth" channel as "1") in Linksys EA4500 AP. I could see the below POST message using wireshark. 3E@@!dPzY+2K SPOST /JNAP/ HTTP/1.1 Host: 192.168.1.1 User-Agent: Mozilla/5.0 (X11;…
user3441116
  • 37
  • 1
  • 8
0
votes
2 answers

Perl LWP::UserAgent failing SSL on a specific server

my $ua = LWP::UserAgent->new(); my $res = $ua->get("https://url"); print $res->content; Resulted in a response that the certificate was not valid (and if I disabled hostname verification the server would say I needed encryption instead), until I…
Gauntlet
  • 141
  • 3
  • 9
0
votes
1 answer

LWP Get Large File Download Headers Missing

This post is follow on work related to LWP GET large file download. That post was regarding an error from LWP when trying to pass arguments in the header incorrectly. Now I am posting the changes I made and how I am trying to debug the approach. …
tradetree
  • 354
  • 3
  • 20
0
votes
1 answer

perl lwp useragent and mysql data download and update character set trouble

I've migrated to a new hosting provider, with same freebsd system, and one of my perl scripts stopped working properly. It downloads data from external https site and stores it in mysql db. Data is in cp1251 encoding, same encoding is in mysql base,…
Sly
  • 415
  • 2
  • 8
0
votes
2 answers

Random error with WWW::Mechanize: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

I'm working with WWW::Mechanize to slurp a products catalog from a web site into our database (Ingram Micro). Everything is over SSL. I'm receiving a random error like the following: Protocol scheme 'https' is not supported (LWP::Protocol::https not…
Francisco Zarabozo
  • 3,676
  • 2
  • 28
  • 54
0
votes
1 answer

Sending POST request with GET variables in URL (with LWP::UserAgent)

I have to make POST request to a URL which also contains GET variables (query string). I tried the following (which looks like a most simepl/logical way) but it does not work: my $ua = LWP::UserAgent->new; my $res =…
storyteller
  • 47
  • 1
  • 5
1 2 3
14
15