Uh oh!
There was an error while loading. Please reload this page.
[4.4] Rework redirect exception - #7610
Merged
Merged
Conversation
iRedds
commented
Jun 25, 2023
CollaboratorAuthor
Added documentation, tests and changes. |
iRedds
marked this pull request as ready for review
June 25, 2023 00:52
kenjis
reviewed
Jun 27, 2023
Uh oh!
There was an error while loading. Please reload this page.
kenjis
reviewed
Jun 27, 2023
Uh oh!
There was an error while loading. Please reload this page.
kenjis
reviewed
Jun 28, 2023
Uh oh!
There was an error while loading. Please reload this page.
kenjis
commented
Jun 28, 2023
Member
The last comment.
This change is not documented. How about like this? --- a/user_guide_src/source/changelogs/v4.4.0.rst+++ b/user_guide_src/source/changelogs/v4.4.0.rst@@ -145,6 +145,10 @@ Changes
So if you installed CodeIgniter under the folder that contains the special
characters like ``(``, ``)``, etc., CodeIgniter didn't work. Since v4.4.0,
this restriction has been removed.
+- **HSTS:** Now :php:func:`force_https()` or+ ``Config\App::$forceGlobalSecureRequests = true`` sets the HTTP status code 307,+ which allows the HTTP request method to be preserved after the redirect.+ In previous versions, it was 302.
Deprecations
************ |
iRedds
commented
Jun 28, 2023
CollaboratorAuthor
@kenjis Thanks for the help. |
Version of the new functionality. Co-authored-by: kenjis <kenji.uui@gmail.com>
iReddsforce-pushed
the
rework-redirect-exception
branch
from
June 29, 2023 00:47
96b6dba to
abb921aComparekenjis
commented
Jun 29, 2023
Member
@iRedds Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I would like to propose the following changes to the handling and use of
RedirectException.RedirectExceptionnow implementsResponsableInterfaceResponsableInterfaceallows developers to add custom exceptions that will prepare the Response object themselves.The logic for generating a Response object for a
RedirectExceptionhas been moved from theCodeigniterclass toRedirectException, and theRedirectExceptioncatch has been replaced with theResponsableInterface.The
RedirectExceptionconstructor now also accepts a ResponseInterface as its first argument. This allows the developer to set headers, cookies, for the Response object.The
CodeIgniter::forceSecureAccess()method has been moved from therun()method to thehandleRequest()method, and theforce_https()function has been redesigned so that it no longer terminates the script, but throws aRedirectException, passing the exception to the constructor Response object. This approach will gracefully terminate the application.The
force_https()function sets the HTTP status code 307, which allows the HTTP request method to be preserved after the redirect.Checklist: