From 9898b2900f553cec304ee2136d264002d1488d10 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 16 Apr 2018 19:19:02 -0500 Subject: [PATCH] Change status_code to that of response for videoplayback --- src/invidious.cr | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index d8f03ff7..e8e0e1af 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -819,7 +819,7 @@ get "/videoplayback" do |env| url = URI.parse(response.headers["Location"]) env.redirect url.full_path else - env.response.status_code = 206 + env.response.status_code = response.status_code response.headers.each do |key, value| env.response.headers[key] = value @@ -830,10 +830,6 @@ get "/videoplayback" do |env| loop do count = response.body_io.read(chunk) - if count == 0 - break - end - begin env.response.write(chunk) env.response.flush