8000 Closes response by default in HTTP::Server::Context#redirect by cyangle · Pull Request #641 · kemalcr/kemal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Closes response by default in HTTP::Server::Context#redirect #641

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

Merged

Conversation

cyangle
Copy link
Contributor
@cyangle cyangle commented Jun 29, 2022

Description of the Change

Closes HTTP::Server::Response by default in HTTP::Server::Context#redirect

Alternate Designs

Does not close response by default with option to override it.

Benefits

Redirections in before filters would skip processing in RouteHandler

Possible Drawbacks

Writing to closed HTTP::Server::Response raises Closed stream (IO::Error)

@cyangle
Copy link
Contributor Author
cyangle commented Jun 29, 2022

Related to #638

@straight-shoota
Copy link
Contributor

I'm not sure if this needs to be configurable. I'd be happy with always closing the response. But it's probably fine to have the option.

Copy link
Member
@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine 👍 Thanks a lot @cyangle 🙏

@sdogruyol sdogruyol merged commit 9bd24ca into kemalcr:master Jun 29, 2022
@cyangle cyangle deleted the close_response_by_default_in_redirect branch June 30, 2022 01:23
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

Successfully merging this pull request may close these issues.

3 participants
0