提交 619e7c8d 编写于 作者: A Aaron Patterson

make sure set_response! sets the correct response object

上级 08b107e3
......@@ -111,5 +111,14 @@ def process(name)
@_response.await_commit
end
def set_response!(request)
if request.env["HTTP_VERSION"] == "HTTP/1.0"
super
else
@_response = Live::Response.new
@_response.request = request
end
end
end
end
......@@ -53,6 +53,12 @@ def build_response
TestResponse.new
end
def test_set_response!
@controller.set_response!(@request)
assert_kind_of(Live::Response, @controller.response)
assert_equal @request, @controller.response.request
end
def test_write_to_stream
@controller = TestController.new
get :basic_stream
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册