This commit is contained in:
garnier-quentin 2014-04-24 12:53:48 +02:00
parent 04e378c76b
commit a57ef3d71c
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ sub connect {
my ($response, $content);
my $req;
if (defined($self->{option_results}->{port})) {
if (defined($self->{option_results}->{port}) && $self->{option_results}->{port} =~ /^[0-9]+$/) {
$req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname}.':'. $self->{option_results}->{port} . $self->{option_results}->{url_path});
} else {
$req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname} . $self->{option_results}->{url_path});