diff options
| author | Connor Dunn <connorhd@gmail.com> | 2018-04-09 20:15:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-09 20:15:42 -0700 |
| commit | 664262f1585d45d9a9f927cb1bc19adcee0012f1 (patch) | |
| tree | e05ebf9343197c14f370983486e543c9509cfe52 /lib/net/ssh/proxy | |
| parent | 07e06034801ff79dd82c94714d81c8f47c9d47f3 (diff) | |
| download | net-ssh-664262f1585d45d9a9f927cb1bc19adcee0012f1.tar.gz | |
Update proxy to HTTP/1.1
Some proxy servers require HTTP/1.1 with a Host header.
Diffstat (limited to 'lib/net/ssh/proxy')
| -rw-r--r-- | lib/net/ssh/proxy/http.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/net/ssh/proxy/http.rb b/lib/net/ssh/proxy/http.rb index 92c75a7..1cfaa62 100644 --- a/lib/net/ssh/proxy/http.rb +++ b/lib/net/ssh/proxy/http.rb @@ -51,7 +51,8 @@ module Net # proxy that was requested when the socket factory was instantiated. def open(host, port, connection_options) socket = establish_connection(connection_options[:timeout]) - socket.write "CONNECT #{host}:#{port} HTTP/1.0\r\n" + socket.write "CONNECT #{host}:#{port} HTTP/1.1\r\n" + socket.write "Host: #{host}:#{port}\r\n" if options[:user] credentials = ["#{options[:user]}:#{options[:password]}"].pack("m*").gsub(/\s/, "") |
