Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (13 sloc) 638 Bytes
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 0d36c07..ce72b3f 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -202,7 +202,7 @@ module WEBrick
if @header['connection'] == "close"
@keep_alive = false
elsif keep_alive?
- if chunked? || @header['content-length']
+ if chunked? || @header['content-length'] || @status == 304 || @status == 204
@header['connection'] = "Keep-Alive"
else
msg = "Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true"