Skip to content

Commit 5a15755

Browse files
committed
Fixed condition in product check
1 parent ec7810a commit 5a15755

File tree

1 file changed

+1
-1
lines changed
  • lib/Search/Elasticsearch/Role

1 file changed

+1
-1
lines changed

lib/Search/Elasticsearch/Role/Cxn.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ sub process_response {
343343

344344
# Product check
345345
if ( $code >= 200 and $code < 300 ) {
346-
unless ($headers->{'X-Elastic-Product'} eq 'Elasticsearch' ) {
346+
if (!defined $headers->{'X-Elastic-Product'} || $headers->{'X-Elastic-Product'} eq 'Elasticsearch') {
347347
throw( "ProductCheck", "The client noticed that the server is not Elasticsearch and we do not support this unknown product" );
348348
}
349349
}

0 commit comments

Comments
 (0)