mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
fix an issues with responding with long strings (#576)
This commit is contained in:
parent
a8c0f09b85
commit
2e749a2987
2 changed files with 12 additions and 1 deletions
|
@ -10,6 +10,17 @@ describe "Kemal::RouteHandler" do
|
|||
client_response.body.should eq("hello")
|
||||
end
|
||||
|
||||
it "routes with long response body" do
|
||||
long_response_body = "string" * 10_000
|
||||
|
||||
get "/" do
|
||||
long_response_body
|
||||
end
|
||||
request = HTTP::Request.new("GET", "/")
|
||||
client_response = call_request_on_app(request)
|
||||
client_response.body.should eq(long_response_body)
|
||||
end
|
||||
|
||||
it "routes should only return strings" do
|
||||
get "/" do
|
||||
100
|
||||
|
|
|
@ -8,7 +8,7 @@ class HTTP::Server::Response
|
|||
|
||||
ensure_headers_written
|
||||
|
||||
super
|
||||
previous_def
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue