+ Enhance http port manage

This commit is contained in:
garnier-quentin 2015-07-29 14:35:55 +02:00
parent cc89e244fc
commit 1b94ef3eb8
1 changed files with 11 additions and 1 deletions

View File

@ -83,7 +83,7 @@ sub check_options {
$self->{output}->option_exit();
}
$options{request}->{port} = $self->get_port();
$options{request}->{port} = $self->get_port_request();
$options{request}->{headers} = {};
if (defined($options{request}->{header})) {
@ -138,6 +138,16 @@ sub get_port {
return $port;
}
sub get_port_request {
my ($self, %options) = @_;
my $port = '';
if (defined($self->{options}->{port}) && $self->{options}->{port} ne '') {
$port = $self->{options}->{port};
}
return $port;
}
sub request {
my ($self, %options) = @_;