Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO not flushed and connection not closed due to response extension #581

Closed
benoist opened this issue Jul 1, 2020 · 1 comment
Closed

Comments

@benoist
Copy link
Contributor

benoist commented Jul 1, 2020

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

@benoist benoist changed the title response extension IO not flushed and connection not closed due to response extension Jul 1, 2020
@mamantoha
Copy link
Contributor

Duplicate #575

@benoist benoist closed this as completed Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants