diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-05-05 17:47:45 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-05-05 17:47:45 -0500 |
| commit | 65a32d6e20f47bbc310d46d64910ac9d66d12ed6 (patch) | |
| tree | b84e188d6e254551c893b8830ec8c50b75503e00 | |
| parent | 92450920d4087a487252e4028cf7e5070dca01d9 (diff) | |
| download | invidious-65a32d6e20f47bbc310d46d64910ac9d66d12ed6.tar.gz invidious-65a32d6e20f47bbc310d46d64910ac9d66d12ed6.tar.bz2 invidious-65a32d6e20f47bbc310d46d64910ac9d66d12ed6.zip | |
Update fix for crystal-lang/crystal#7383
| -rw-r--r-- | src/invidious/helpers/handlers.cr | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr index 98087ec7..bc1a3896 100644 --- a/src/invidious/helpers/handlers.cr +++ b/src/invidious/helpers/handlers.cr @@ -200,9 +200,12 @@ class DenyFrame < Kemal::Handler 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 +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 |
