CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
400 URL must be absolute

 



mmcw
User

May 27, 2004, 5:30 AM

Post #1 of 2 (501 views)
400 URL must be absolute Can't Post

I am using the following code:


Code
   

#!/usr/bin/perl

my $debug_fake_cron = 1;

use LWP;

my $row = "http://www.mmc-shop.nl/cgi-bin/Shop/shop_art.cgi";

print "Content-type: text/html\r\n\r\n" if ($debug_fake_cron);
print "Start execute command: $executable ($row)<br />" if ($debug_fake_cron);
my $browser = LWP::UserAgent->new();
$browser->agent("SmartCron");
$browser->timeout(5);
my $response = $browser->get('$row');

if ($response->is_success) {
print "Success: " .$response->content . "<br />" if ($debug_fake_cron);
}
else {
print "Error: " .$response->status_line . "<br />" if ($debug_fake_cron);
}

print "Execute command: $row<br />" if ($debug_fake_cron);
$browser->request(HTTP::Request->new(GET => $row)) or ($error = 1);

exit(0);



It will return the following:


Quote


Start execute command: (http://www.mmc-shop.nl/cgi-bin/Shop/shop_art.cgi)
Error: 400 URL must be absolute
Execute command: http://www.mmc-shop.nl/cgi-bin/Shop/shop_art.cgi



However I get the message: 400 URL must be absolute

What does it mean and what am I doing wrong to make this work?


davorg
Thaumaturge / Moderator

May 28, 2004, 12:49 AM

Post #2 of 2 (494 views)
Re: [mmcw] 400 URL must be absolute [In reply to] Can't Post

See my answer elsewhere.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives