LWP::UserAgent post to post other than 80

Z

Zapanaz

What I am trying to do is post to a cgi script.

The way I am doing it is this:

my $ua = LWP::UserAgent->new();
my $response =
$ua->post("http://1.2.3.4:7775/cgi-local/fm_account.cgi");

where the IP address is a real one and not 1.2.3.4

I know the URL is valid, I can hit it in a web browser, when the code
runs though it hangs.

There are a lot of things that could be going wrong, but one thing I
am not sure of is if I can specify server:port like that with
UserAgent. Should that work? That is, if I am using http, is it
going to assume port 80, and fail to work correctly if it isn't?

Thanks for any help.



--
Zapanaz
International Satanic Conspiracy
Customer Support Specialist
http://joecosby.com/
The victim was pregnant by seeing her picture on a website
featuring her dogs for sale.
 
G

Gregory Toomey

Zapanaz said:
What I am trying to do is post to a cgi script.

The way I am doing it is this:

my $ua = LWP::UserAgent->new();
my $response =
$ua->post("http://1.2.3.4:7775/cgi-local/fm_account.cgi");

where the IP address is a real one and not 1.2.3.4

I know the URL is valid, I can hit it in a web browser, when the code
runs though it hangs.

There are a lot of things that could be going wrong, but one thing I
am not sure of is if I can specify server:port like that with
UserAgent. Should that work? That is, if I am using http, is it
going to assume port 80, and fail to work correctly if it isn't?

Thanks for any help.

That should work. The problem could be with cookies, basic authentication,
or http_referrer.
For testing try wget with the URL.

gtoomey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top