aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick/httpresponse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick/httpresponse.rb')
-rw-r--r--lib/webrick/httpresponse.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 9d6e5522ed..a0e7155ce6 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -132,11 +132,12 @@ module WEBrick
# Keep-Alive connection.
if @header['connection'] == "close"
@keep_alive = false
- end
- if keep_alive?
+ elsif keep_alive?
if chunked? || @header['content-length']
@header['connection'] = "Keep-Alive"
end
+ else
+ @header['connection'] = "close"
end
# Location is a single absoluteURI.