mirror of
https://github.com/iv-org/invidious.git
synced 2025-10-16 20:38:08 +00:00
Update Kemal to 1.6.0 and remove Kilt
Kilt is unmaintained and the ECR templating logic has been natively integrated into Kemal with the issues previously seen having been resolved. This commit is mostly a precursor to support the next Kemal release which will add the ability to create error handlers for raised exceptions. See https://github.com/kemalcr/kemal/pull/688
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
# Overrides for Kemal's `content_for` macro in order to keep using
|
||||
# kilt as it was before Kemal v1.1.1 (Kemal PR #618).
|
||||
|
||||
require "kemal"
|
||||
require "kilt"
|
||||
|
||||
macro content_for(key, file = __FILE__)
|
||||
%proc = ->() {
|
||||
__kilt_io__ = IO::Memory.new
|
||||
{{ yield }}
|
||||
__kilt_io__.to_s
|
||||
}
|
||||
|
||||
CONTENT_FOR_BLOCKS[{{key}}] = Tuple.new {{file}}, %proc
|
||||
nil
|
||||
end
|
@@ -71,7 +71,7 @@ def send_file(env : HTTP::Server::Context, file_path : String, data : Slice(UInt
|
||||
filesize = data.bytesize
|
||||
attachment(env, filename, disposition)
|
||||
|
||||
Kemal.config.static_headers.try(&.call(env.response, file_path, filestat))
|
||||
Kemal.config.static_headers.try(&.call(env, file_path, filestat))
|
||||
|
||||
file = IO::Memory.new(data)
|
||||
if env.request.method == "GET" && env.request.headers.has_key?("Range")
|
||||
|
Reference in New Issue
Block a user