+ Enhance http port manage
This commit is contained in:
parent
cc89e244fc
commit
1b94ef3eb8
|
@ -83,7 +83,7 @@ sub check_options {
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$options{request}->{port} = $self->get_port();
|
$options{request}->{port} = $self->get_port_request();
|
||||||
|
|
||||||
$options{request}->{headers} = {};
|
$options{request}->{headers} = {};
|
||||||
if (defined($options{request}->{header})) {
|
if (defined($options{request}->{header})) {
|
||||||
|
@ -138,6 +138,16 @@ sub get_port {
|
||||||
return $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 {
|
sub request {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue