diff options
author | Miklós Fazekas <mfazekas@szemafor.com> | 2018-05-23 12:07:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 12:07:17 +0200 |
commit | b8506b033c5cbe16e563ae798654515550c0933f (patch) | |
tree | e05ebf9343197c14f370983486e543c9509cfe52 | |
parent | 07e06034801ff79dd82c94714d81c8f47c9d47f3 (diff) | |
parent | 664262f1585d45d9a9f927cb1bc19adcee0012f1 (diff) | |
download | net-ssh-b8506b033c5cbe16e563ae798654515550c0933f.tar.gz |
Merge pull request #597 from Connorhd/patch-1
Update proxy to HTTP/1.1
-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/, "") |