summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDelano Mandelbaum <delano.mandelbaum@gmail.com>2013-08-25 06:36:46 -0700
committerDelano Mandelbaum <delano.mandelbaum@gmail.com>2013-08-25 06:36:46 -0700
commit9179596965ae1371fa3e3b6cedef08aca498a2cb (patch)
treed84017bc8be45f6d728ac4bee7e3c6273259188a
parent15599d7aab2a3460a16d857451e9f9a5460ee115 (diff)
parent899f1cf75ab8055f33b5dcbf71e940b0c94ac9a4 (diff)
downloadnet-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.rb2
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