diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-07-04 15:47:19 +0000 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-07-25 22:13:08 +0200 |
| commit | 61d75050e46e5318a1271c2eade29469c8c9e8a5 (patch) | |
| tree | c4999626f41fee94ecf76e038364a05ef608362e /src | |
| parent | 10e5788c212587b7c929c84580aea3e93b2f28ea (diff) | |
| download | invidious-61d75050e46e5318a1271c2eade29469c8c9e8a5.tar.gz invidious-61d75050e46e5318a1271c2eade29469c8c9e8a5.tar.bz2 invidious-61d75050e46e5318a1271c2eade29469c8c9e8a5.zip | |
SigHelper: Use 'URI.parse' instead of 'URI.new'
Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/helpers/sig_helper.cr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious/helpers/sig_helper.cr b/src/invidious/helpers/sig_helper.cr index b8b985d5..09079850 100644 --- a/src/invidious/helpers/sig_helper.cr +++ b/src/invidious/helpers/sig_helper.cr @@ -274,10 +274,10 @@ class Invidious::SigHelper when .starts_with?('/') @socket = UNIXSocket.new(host_or_path) when .starts_with?("tcp://") - uri = URI.new(host_or_path) + uri = URI.parse(host_or_path) @socket = TCPSocket.new(uri.host.not_nil!, uri.port.not_nil!) else - uri = URI.new("tcp://#{host_or_path}") + uri = URI.parse("tcp://#{host_or_path}") @socket = TCPSocket.new(uri.host.not_nil!, uri.port.not_nil!) end |
