luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

Close the reponse after a redirect to avoid double redirects. #1736

Closed jwoertink closed 1 year ago

jwoertink commented 1 year ago

Purpose

Fixes #1735

Description

Coming up in Crystal 1.7, HTTP response will have a redirect method built-in. That method calls close after setting the Location header. I think this might also fix this elusive bug https://forum.crystal-lang.org/t/help-solving-io-error/130

Checklist

jwoertink commented 1 year ago

I'm gonna hold this open for a day. That nightly should have worked, but maybe they need to push an update....