kemalcr / kemal

Fast, Effective, Simple Web Framework
https://kemalcr.com
MIT License
3.62k stars 188 forks source link

Error: undefined method 'modification_time' for Kemal::StaticFileHandler (Crystal 1.6.0) #649

Closed petr-fischer closed 2 years ago

petr-fischer commented 2 years ago

Hello, latest kemal (1.2.0) started to complain something about Kemal::StaticFileHandler, I am lost a little...

# --- strip ---

In /usr/share/crystal/src/http/server/handler.cr:28:20

 28 | next_handler.call(context)
                   ^---
Error: instantiating '(HTTP::Handler | Proc(HTTP::Server::Context, Nil))#call(HTTP::Server::Context)'

In lib/kemal/src/kemal/static_file_handler.cr:51:27

 51 | last_modified = modification_time(file_path)
                      ^----------------
Error: undefined method 'modification_time' for Kemal::StaticFileHandler
Blacksmoke16 commented 2 years ago

Duplicate of #648 and #643

straight-shoota commented 2 years ago

This is fixed on master, just not released yet. @sdogruyol We need a release for compatibility with 1.6.0.