-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Tracy always starts a session #356
Comments
Can you send PR? |
Maybe. It depends on how deep the session goes. I will give it a try. |
@jkufner It starts in debug mode only, doesn't? tracy/src/Bridges/Nette/TracyExtension.php Lines 106 to 123 in 92b97ca
|
@milo Yes, the following line causes the issue:
|
@jkufner Sorry, my point is: Is it a problem to always start session in debug mode? Tracy "always" needs. Usually it is a session for developer on local machine. |
@milo If there are no errors to report, then there is no reason to have a session stored and a cookie sent to a client. Tracy <2.4 behaves this way. Always starting a session prevents us from implementing a state-less API and pollutes the server with useless sessions as every request creates a new session because non-browser clients ignore cookies. |
@jkufner Your server does not run in a production mode? |
@milo Of course not; it is a development server. |
Hi, we have a similar problem and we would appriciate Tracy without session. I prepared PR - just a concept. |
Version: 2.4.0+, introduced by 5c46e98
Bug Description
Tracy always starts a session because 5c46e98#diff-be100a67d872789dffa3bfba6144122dR89
Steps To Reproduce
Don't start a session, enable Tracy.
Expected Behavior
Session does not start.
Possible Solution
Remove the start() call from DI container and don't be lazy to check if there is a started session. Such a code don't belong to DI container anyway.
See 5c46e98#diff-be100a67d872789dffa3bfba6144122dR89
The text was updated successfully, but these errors were encountered: