From 1dc2bc74580060d4f00dd4a45e02a70574a56672 Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Wed, 19 Jul 2017 00:31:31 +0100 Subject: [PATCH] Fix serving files that clash with directories Fix #6222, related to #3452 See base class search_file implementation: https://github.com/ruby/webrick/blob/3fb6a011/lib/webrick/httpservlet/filehandler.rb#L365-L385 --- lib/jekyll/commands/serve/servlet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/commands/serve/servlet.rb b/lib/jekyll/commands/serve/servlet.rb index 3ae5cf32367..2e20ace81d5 100644 --- a/lib/jekyll/commands/serve/servlet.rb +++ b/lib/jekyll/commands/serve/servlet.rb @@ -22,7 +22,7 @@ def initialize(server, root, callbacks) def search_file(req, res, basename) # /file.* > /file/index.html > /file.html - super || super(req, res, "#{basename}.html") + super || super(req, res, ".html") || super(req, res, "#{basename}.html") end # rubocop:disable Style/MethodName