kemalcr / kemal

Fast, Effective, Simple Web Framework

Home Page:https://kemalcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IO not flushed and connection not closed due to response extension

benoist opened this issue · comments

Description

The response extension is causing web requests not to be closed on large body content

Steps to Reproduce

get "/" do
"a"*9000 + "!"
end

Expected behavior: [What you expect to happen]

The exclamation mark should be return using curl http://localhost:8080

Actual behavior: [What actually happens]

The exclamation mark is not returned using curl http://localhost:8080 and the connection stays open

Reproduces how often: [What percentage of the time does it reproduce?]

always

Versions

crystal 0.35.1

Additional Information

This file causes the issue as it overwrites the close method, but it doenst flush the IO as is down in the original implemenation.
https://github.com/kemalcr/kemal/blob/master/src/kemal/ext/response.cr

Duplicate #575