Refs #5474
This commit is contained in:
parent
04e378c76b
commit
a57ef3d71c
|
@ -48,7 +48,7 @@ sub connect {
|
||||||
my ($response, $content);
|
my ($response, $content);
|
||||||
my $req;
|
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});
|
$req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname}.':'. $self->{option_results}->{port} . $self->{option_results}->{url_path});
|
||||||
} else {
|
} else {
|
||||||
$req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname} . $self->{option_results}->{url_path});
|
$req = HTTP::Request->new( GET => $self->{option_results}->{proto}. "://" . $self->{option_results}->{hostname} . $self->{option_results}->{url_path});
|
||||||
|
|
Loading…
Reference in New Issue