-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fix for withForm bug #51
base: master
Are you sure you want to change the base?
Conversation
… session has been changed, and a method on the wrapped response that triggers a cookie write is called.
Hi Christopher, Thanks for the fix. At first blush, I don't see a problem with the code, but I am concerned about the number of times the session gets written and when it can be written. If the session is written an excessive number of times, it impacts performance significantly. Also, if it gets written more than once into the response, then it runs the risk of changing size and overwriting other data in the response. Can you do me a solid and checkout the repo: https://github.com/benlucchesi/test-cookie-session-plugin To launch the test suite use: grails test-app --https :spock This will launch integration and functional tests. The functional tests use the firefox selenium drive so you'll need firefox installed. You may need to add or configure logging to detect how and when the session gets written. There isn't a test specifically for this condition, but if there is a problem, hopefully something breaks. thanks, |
@@ -75,8 +69,10 @@ public void saveSession(){ | |||
return; | |||
} | |||
|
|||
// flag the session as saved. | |||
sessionSaved = true; | |||
if(session.getIsDirty() == false ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!session.getIsDirty()) {
Haven't had a chance to dig into testing this against the test harnesses. If someone has time, and wants to give it a shot it would be appreciated. |
I'll check it out soon.
|
No description provided.