summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsyeopite <syeopite@syeopite.dev>2025-01-22 11:33:20 -0800
committersyeopite <syeopite@syeopite.dev>2025-01-22 11:33:20 -0800
commit086c6209ab7c2c28f8b67c4b02f9fff4ec1c2a39 (patch)
treef7a9391aca8ce89f5d14643b0b2a9c85cdf0ff9b /src
parent0d398c9d1ad0e1b343deef7ccab37c8c7fe3acd9 (diff)
parent1333fed26cd016274bc5951a525faf53ef1b9cc2 (diff)
downloadinvidious-086c6209ab7c2c28f8b67c4b02f9fff4ec1c2a39.tar.gz
invidious-086c6209ab7c2c28f8b67c4b02f9fff4ec1c2a39.tar.bz2
invidious-086c6209ab7c2c28f8b67c4b02f9fff4ec1c2a39.zip
Remove stdlib override for proxy initialization (#5065)
Diffstat (limited to 'src')
-rw-r--r--src/invidious/helpers/crystal_class_overrides.cr34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/invidious/helpers/crystal_class_overrides.cr b/src/invidious/helpers/crystal_class_overrides.cr
index 3040d7a0..fec3f62c 100644
--- a/src/invidious/helpers/crystal_class_overrides.cr
+++ b/src/invidious/helpers/crystal_class_overrides.cr
@@ -18,40 +18,6 @@ end
class HTTP::Client
property family : Socket::Family = Socket::Family::UNSPEC
- # Override stdlib to automatically initialize proxy if configured
- #
- # Accurate as of crystal 1.12.1
-
- def initialize(@host : String, port = nil, tls : TLSContext = nil)
- check_host_only(@host)
-
- {% if flag?(:without_openssl) %}
- if tls
- raise "HTTP::Client TLS is disabled because `-D without_openssl` was passed at compile time"
- end
- @tls = nil
- {% else %}
- @tls = case tls
- when true
- OpenSSL::SSL::Context::Client.new
- when OpenSSL::SSL::Context::Client
- tls
- when false, nil
- nil
- end
- {% end %}
-
- @port = (port || (@tls ? 443 : 80)).to_i
-
- self.proxy = make_configured_http_proxy_client() if CONFIG.http_proxy
- end
-
- def initialize(@io : IO, @host = "", @port = 80)
- @reconnect = false
-
- self.proxy = make_configured_http_proxy_client() if CONFIG.http_proxy
- end
-
private def io
io = @io
return io if io