mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-31 01:24:35 +02:00
backend curl: header case insensitive
This commit is contained in:
parent
721543f96c
commit
749eef09ff
@ -251,7 +251,7 @@ sub parse_headers {
|
||||
if (!defined($self->{response_headers_parse}->{$header}));
|
||||
push @{$self->{response_headers_parse}->{$header}}, $value;
|
||||
}
|
||||
$header = $1;
|
||||
$header = lc($1);
|
||||
$value = $2;
|
||||
} elsif (/^\s+(.*)/) {
|
||||
$value .= ', ' . $1;
|
||||
@ -388,8 +388,8 @@ sub get_header {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return undef
|
||||
if (!defined($self->{response_headers_parse}->{$options{name}}));
|
||||
return wantarray ? @{$self->{response_headers_parse}->{$options{name}}} : $self->{response_headers_parse}->{$options{name}}->[0];
|
||||
if (!defined($self->{response_headers_parse}->{ lc($options{name}) }));
|
||||
return wantarray ? @{$self->{response_headers_parse}->{ lc($options{name}) }} : $self->{response_headers_parse}->{ lc($options{name}) }->[0];
|
||||
}
|
||||
|
||||
sub get_code {
|
||||
|
Loading…
x
Reference in New Issue
Block a user