adaoraul/rack-jekyll

Files of unknown mime type can not be served

stomar opened this issue · 1 comments

(WIP, to be fixed in next bug fix released).

Files whose mime type can not be determined are not served properly. Rack-Jekyll assumes them to be directories and tries to serve the corresponding index.html, without making sure one exists.

Example: a README file in site root (or any file without or with unknown extension)

Errno::ENOTDIR at /README
Not a directory @ rb_sysopen - /[...]/_site/README/index.html

Desired behavior:

  • files and directories in _site must be distinguished and treated accordingly
  • files of unknown mime type should be served with default type application/octet-stream

Fixed with 4089828 and 3e6a517.