#7851 allow UTF-8 in config file

Fixes #7852
This commit is contained in:
Armin 2017-07-31 10:18:57 +02:00 committed by Armin Braun
parent 8a28d2fe84
commit 7a73c5fd7b

View file

@ -53,7 +53,7 @@ module LogStash module Config module Source
config_string = ::File.read(file)
if valid_encoding?(config_string)
if config_string.valid_encoding?
part = org.logstash.common.SourceWithMetadata.new("file", file, 0, 0, config_string)
config_parts << part
else
@ -101,10 +101,6 @@ module LogStash module Config module Source
all_files - get_matched_files
end
def valid_encoding?(content)
content.ascii_only? && content.valid_encoding?
end
def temporary_file?(filepath)
filepath.match(TEMPORARY_FILE_RE)
end