summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 104dca96810..b908b8ae795 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -100,11 +100,13 @@ class HTTPBadResponse < HTTPError; end
@socket.reopen
end
- yield
+ header = yield
unless keep_alive? u_header then
@socket.close
end
+
+ header
end
def keep_alive?( header )