summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2020-02-20 18:30:35 -0500
committerOmar Roth <omarroth@protonmail.com>2020-02-20 18:30:46 -0500
commit43da06a354658100f1d2cb0993ce744ac0e61727 (patch)
treebcd97e70080489debb9b8bf14f75dd9c39ef0dbc
parentfea6b67067356b43655a0e66adf8cb78b4a9ec8b (diff)
downloadinvidious-43da06a354658100f1d2cb0993ce744ac0e61727.tar.gz
invidious-43da06a354658100f1d2cb0993ce744ac0e61727.tar.bz2
invidious-43da06a354658100f1d2cb0993ce744ac0e61727.zip
Remove temp fix for crystal/crystal-lang#7383
-rw-r--r--src/invidious/helpers/handlers.cr26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr
index 456618cf..87b10bc9 100644
--- a/src/invidious/helpers/handlers.cr
+++ b/src/invidious/helpers/handlers.cr
@@ -212,29 +212,3 @@ class DenyFrame < Kemal::Handler
call_next env
end
end
-
-# Temp fixes for https://github.com/crystal-lang/crystal/issues/7383
-class HTTP::UnknownLengthContent
- def read_byte
- ensure_send_continue
- if @io.is_a?(OpenSSL::SSL::Socket::Client)
- return if @io.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
- end
- @io.read_byte
- end
-end
-
-class HTTP::Client
- private def handle_response(response)
- if @socket.is_a?(OpenSSL::SSL::Socket::Client) && @host.ends_with?("googlevideo.com")
- close unless response.keep_alive? || @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
-
- if @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
- @socket = nil
- end
- else
- close unless response.keep_alive?
- end
- response
- end
-end