Skip to content

Commit 33573ee

Browse files
committed
[Client] Checks for empty body in gzipped?
1 parent 61ec599 commit 33573ee

File tree

1 file changed

+2
-1
lines changed
  • elasticsearch-transport/lib/elasticsearch/transport/transport

1 file changed

+2
-1
lines changed

elasticsearch-transport/lib/elasticsearch/transport/transport/base.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ def decompress_response(body)
413413
end
414414

415415
def gzipped?(body)
416-
return unless body
416+
return unless body && !body.empty?
417+
417418
body[0..1].unpack(HEX_STRING_DIRECTIVE)[0] == GZIP_FIRST_TWO_BYTES
418419
end
419420

0 commit comments

Comments
 (0)