mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-26 07:05:06 +02:00
update expected-content
This commit is contained in:
parent
7cc661fb9b
commit
3fd26ac1f3
@ -152,7 +152,7 @@ sub load_request {
|
|||||||
if (-f $self->{option_results}->{data} and -r $self->{option_results}->{data}) {
|
if (-f $self->{option_results}->{data} and -r $self->{option_results}->{data}) {
|
||||||
local $/ = undef;
|
local $/ = undef;
|
||||||
my $fh;
|
my $fh;
|
||||||
if (!open($fh, "<:encoding(UTF-8)", $self->{option_results}->{data})) {
|
if (!open($fh, "<", $self->{option_results}->{data})) {
|
||||||
$self->{output}->output_add(
|
$self->{output}->output_add(
|
||||||
severity => 'UNKNOWN',
|
severity => 'UNKNOWN',
|
||||||
short_msg => sprintf("Could not read file '%s': %s", $self->{option_results}->{data}, $!)
|
short_msg => sprintf("Could not read file '%s': %s", $self->{option_results}->{data}, $!)
|
||||||
@ -160,11 +160,8 @@ sub load_request {
|
|||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
$self->{output}->exit();
|
$self->{output}->exit();
|
||||||
}
|
}
|
||||||
my $file_content = <$fh>;
|
$self->{options_request}->{query_form_post} = <$fh>;
|
||||||
close $fh;
|
close $fh;
|
||||||
$/ = "\n";
|
|
||||||
chomp $file_content;
|
|
||||||
$self->{options_request}->{query_form_post} = $file_content;
|
|
||||||
} else {
|
} else {
|
||||||
$self->{options_request}->{query_form_post} = $self->{option_results}->{data};
|
$self->{options_request}->{query_form_post} = $self->{option_results}->{data};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user