Skip Menu |

This queue is for tickets about the Net-SMS CPAN distribution.

Report information
The Basics
Id: 37053
Status: new
Priority: 0/
Queue: Net-SMS

People
Owner: Nobody in particular
Requestors: allzfair [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Net::SMS::Http fails for URLs without URI specified.
my $http = new Net::SMS::HTTP; my $url = "http://mywebsite.com"; $http->request($url); # fails to recognize protocol, port, host etc.. my $url = "http://mywebsite.com/"; $http->request($url); # Works just fine ---------------------- Checked the code. Looked simple to fix. So, here's my fix. Would like it if you would consider and fix it in the released version. --Manjunath.N ---------------------- --- /usr/lib/perl5/site_perl/5.8.8/Net/SMS/HTTP.pm 2001-04-27 06:21:56.000000000 +0530 +++ ./HTTP.pm 2008-06-24 17:17:56.000000000 +0530 @@ -72,7 +72,9 @@ sub request # Parse URL my ($protocol,$host,$junk,$port,$object) = - $url =~ m{^([^:/]+)://([^/:]*)(:(\d+))?(/.*)$}; + $url =~ m{^([^:/]+)://([^/:]*)(:(\d+))?(/?.*)$}; + + $object = '/' if (!$object); # Only HTTP is supported here if ($protocol ne "http") ----------------------