lib/rack/handler/mongrel.rb in kastner-rack-0.3.171 vs lib/rack/handler/mongrel.rb in kastner-rack-0.3.186
- 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