Skip to content

Commit

Permalink
make gzip pattern check a regex pattrn check
Browse files Browse the repository at this point in the history
  • Loading branch information
eherot committed Nov 5, 2023
1 parent d1a4951 commit f062e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logstash/inputs/s3/remote_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def compressed_gzip?
# Usually I would use the content_type to retrieve this information.
# but this require another call to S3 for each download which isn't really optimal.
# So we will use the filename to do a best guess at the content type.
::File.extname(remote_object.key).downcase == @gzip_pattern
::File.extname(remote_object.key).downcase =~ Regexp.new(@gzip_pattern)
end

def inspect
Expand Down

0 comments on commit f062e94

Please sign in to comment.