From b58d6c54effda3acac4a67ed4898343faec2d9a9 Mon Sep 17 00:00:00 2001 From: Stan Liberman Date: Mon, 27 Jan 2014 23:42:03 -0600 Subject: [PATCH] Some servers have spaces in empty lines, triggering an error parsing unless stripped --- lib/httpclient/session.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpclient/session.rb b/lib/httpclient/session.rb index 80abe028..9d7a79b1 100644 --- a/lib/httpclient/session.rb +++ b/lib/httpclient/session.rb @@ -906,7 +906,7 @@ def parse_header raise BadResponseError.new('unexpected EOF') end line.chomp! - break if line.empty? + break if line.strip.empty? if line[0] == ?\ or line[0] == ?\t last = @headers.last[1] last << ' ' unless last.empty?