lib/apipie/static_dispatcher.rb in apipie-rails-1.4.1 vs lib/apipie/static_dispatcher.rb in apipie-rails-1.4.2

- old
+ new

@@ -14,11 +14,11 @@ end def match?(path) # Replace all null bytes path = ::Rack::Utils.unescape(path || '') - .encode(Encoding::UTF_8, invalid: :replace, replace: '') - .gsub("\x0", '') + .encode(Encoding::UTF_8, invalid: :replace, replace: '') + .gsub("\x0", '') full_path = path.empty? ? @root : File.join(@root, path) paths = "#{full_path}#{ext}" matches = Dir[paths]