-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Set cookie max Expires to 400 days #6413
Conversation
It is draft-ietf-httpbis-rfc6265bis-latest, not RFC 6265. The method name |
I stand corrected. The referenced internet draft is not RFC 6265, but is intended to obsolete and replace RFC 6265. |
That's got some sign-off! This was just published (8/15) - anyone know the voting/implementation lifecycle of RFCs like this? |
How is this a breaking change? I checked with Microsoft Edge today, and seems it is using the 400 days as expires of the request cookie. Well, aside from the tests expecting the expires of
diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index ff2ac645c..4b1899517 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -36,6 +36,7 @@ $routes->set404Override();
// We get a performance increase by specifying the default
// route since we don't have to scan directories.
$routes->get('/', 'Home::index');
+$routes->get('/yard', 'Home::test');
/*
* --------------------------------------------------------------------
diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php
index 7f867e95f..d425bb207 100644
--- a/app/Controllers/Home.php
+++ b/app/Controllers/Home.php
@@ -2,10 +2,20 @@
namespace App\Controllers;
+use CodeIgniter\Cookie\Cookie;
+
class Home extends BaseController
{
public function index()
{
- return view('welcome_message');
+ $this->response->setCookie((new Cookie('cookie', 'monsters'))->withNeverExpiring());
+ return redirect()->withCookies()->to('/yard');
+
+ // return view('welcome_message');
+ }
+
+ public function test()
+ {
+ var_dump($_COOKIE);
}
} |
Do we need the |
Yes let's deprecate it. If we have a feature that inherently creates differing behavior across browsers that's a detractor. I also don't like that this is called "never expiring" but sets for five years. |
See #6463 |
Description
Based on Replacement to RFC 6265, the max Expires SHOULD NOT be greater than 400 days.
Thus, browsers crop the expires limit to this amount.
Checklist: