fluent/fluentd — Issue #22: buf_file plugin doesn't support key which contains '/'
Author: eller86
Created: 2011-11-30 10:33:54+00:00
State: open

Bug in buf_plugin.rb:

def encode_key(key)
URI.encode(key, /[^-_.a-zA-Z0-9]/n)
end

def decode_key(encoded_key)
URI.decode(encoded_key, /[^-_.a-zA-Z0-9]/n)
end

`URI.encode('/', /[^-_.a-zA-Z0-9]/n)` returns `"%2F"`, and `URI.decode('%2F', /[^-_.a-zA-Z0-9]/n)` returns `"\u00002F"`.
so the fluent-s3-plugin cannot create sub directories.

I tested in ruby 1.9.2.