mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Remove temp fix for crystal/crystal-lang#7383
This commit is contained in:
parent
fea6b67067
commit
43da06a354
1 changed files with 0 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue