mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add temporary fix for crystal-lang/crystal#7383
This commit is contained in:
parent
1fcd1ff3e8
commit
e86eb16d91
2 changed files with 9 additions and 1 deletions
|
@ -4230,7 +4230,7 @@ get "/videoplayback" do |env|
|
||||||
url = "/videoplayback?#{query_params.to_s}"
|
url = "/videoplayback?#{query_params.to_s}"
|
||||||
|
|
||||||
headers = HTTP::Headers.new
|
headers = HTTP::Headers.new
|
||||||
{"Range", "Accept", "Accept-Encoding"}.each do |header|
|
{"Accept", "Accept-Encoding", "Connection", "Range"}.each do |header|
|
||||||
if env.request.headers[header]?
|
if env.request.headers[header]?
|
||||||
headers[header] = env.request.headers[header]
|
headers[header] = env.request.headers[header]
|
||||||
end
|
end
|
||||||
|
|
|
@ -75,6 +75,14 @@ class DenyFrame < Kemal::Handler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Temp fix for https://github.com/crystal-lang/crystal/issues/7383
|
||||||
|
class HTTP::Client
|
||||||
|
private def handle_response(response)
|
||||||
|
# close unless response.keep_alive?
|
||||||
|
response
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def rank_videos(db, n)
|
def rank_videos(db, n)
|
||||||
top = [] of {Float64, String}
|
top = [] of {Float64, String}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue