diff options
author | Delano Mandelbaum <delano.mandelbaum@gmail.com> | 2013-08-25 06:36:46 -0700 |
---|---|---|
committer | Delano Mandelbaum <delano.mandelbaum@gmail.com> | 2013-08-25 06:36:46 -0700 |
commit | 9179596965ae1371fa3e3b6cedef08aca498a2cb (patch) | |
tree | d84017bc8be45f6d728ac4bee7e3c6273259188a | |
parent | 15599d7aab2a3460a16d857451e9f9a5460ee115 (diff) | |
parent | 899f1cf75ab8055f33b5dcbf71e940b0c94ac9a4 (diff) | |
download | net-ssh-9179596965ae1371fa3e3b6cedef08aca498a2cb.tar.gz |
Merge pull request #112 from daisybill/master
Guard against nil socket.gets responses
-rw-r--r-- | lib/net/ssh/proxy/http.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/ssh/proxy/http.rb b/lib/net/ssh/proxy/http.rb index 4f86dcf..0d183be 100644 --- a/lib/net/ssh/proxy/http.rb +++ b/lib/net/ssh/proxy/http.rb @@ -73,7 +73,7 @@ module Net; module SSH; module Proxy version, code, reason = socket.gets.chomp.split(/ /, 3) headers = {} - while (line = socket.gets.chomp) != "" + while (line = socket.gets) && (line.chomp! != "") name, value = line.split(/:/, 2) headers[name.strip] = value.strip end |