lib/net/ssh/proxy/http.rb in net-ssh-2.6.8 vs lib/net/ssh/proxy/http.rb in net-ssh-2.7.0
- old
+ new
@@ -71,10 +71,10 @@
def parse_response(socket)
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
if headers["Content-Length"]