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

Do not exit until all Response is completed #1505

Merged
merged 1 commit into from
Nov 19, 2018

Conversation

natanfelles
Copy link
Contributor

@natanfelles natanfelles commented Nov 19, 2018

Description

Fixes #1393

CodeIgniter was exiting before send all headers when returning a RedirectResponse.

Now, it acts the same way as when returning a Response redirect.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@jim-parry
Copy link
Contributor

Good catch.It looks like I caught one of the problems but missed the other.
And you confirm that the fix works, since you filed the original report?

@natanfelles
Copy link
Contributor Author

Yes. Confirmed.

With this the response with redirect() helper is similar to Response::redirect().

No headers are repeated.

However removing this exit, the after filters, storePreviousURL, and post_system Event will run when returning a RedirectResponse. I have not seen any problem in this, since this is the default process when redirection is done with Response.

@lonnieezell
Copy link
Member

That looks like that should do it. Good catch.

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