summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/invidious/helpers/helpers.cr10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr
index 072bdf95..d332ad37 100644
--- a/src/invidious/helpers/helpers.cr
+++ b/src/invidious/helpers/helpers.cr
@@ -700,6 +700,16 @@ def proxy_file(response, env)
end
end
+class HTTP::Server::Response
+ class Output
+ private def unbuffered_flush
+ @io.flush
+ rescue ex : IO::Error
+ unbuffered_close
+ end
+ end
+end
+
class HTTP::Client::Response
def pipe(io)
HTTP.serialize_body(io, headers, @body, @body_io, @version)