vendor/rack/lib/rack/handler/mongrel.rb in relevance-castronaut-0.5.4 vs vendor/rack/lib/rack/handler/mongrel.rb in relevance-castronaut-0.6.0
- old
+ new
@@ -58,18 +58,22 @@
status, headers, body = @app.call(env)
begin
response.status = status.to_i
+ response.send_status(nil)
+
headers.each { |k, vs|
vs.each { |v|
response.header[k] = v
}
}
+ response.send_header
+
body.each { |part|
- response.body << part
+ response.write part
+ response.socket.flush
}
- response.finished
ensure
body.close if body.respond_to? :close
end
end
end