greenlaw110/greenscript — Issue #23: greenscript css request resets PLAY_FLASH cookie
Author: scottbert
Created: 2011-11-05 13:32:57+00:00
State: open

Took a while to work this out, we had intermittent problems with PLAY_FLASH being wiped, eventually found the culprit:

This response comes from my HTML:

Server: Play! Framework;1.2.3;dev

Content-Type: text/html; charset=utf-8

Set-Cookie: PLAY_FLASH=%00url%3A%2Fsearch%3Fmatch%3Dfeet%26go%3DGo%26compatibility%3D%00;Path=/
PLAY_ERRORS=;Expires=Sat, 5-Nov-11 13:23:03 GMT;Path=/
PLAY_SESSION=173568528f604221761b8b9447afb9874260e402-%00___AT%3A7205f096798cddd5d1a2ff9ad83427161e19ac46%00;Path=/

Cache-Control: no-cache

Content-Length: 22199

Then, almost immediately, the request is made for the CSS:

http://localhost:9000/public/gs/a7e85415-75e3-4c62-a0c5-bcf51155de36.css

which gives this response:

Server: Play! Framework;1.2.3;dev

Content-Type: text/css; charset=utf-8

Last-Modified: Sat, 05 Nov 2011 13:23:03 GMT

Etag: "1320499383470-1898950291"

Cache-Control: max-age=8640000

Set-Cookie: PLAY_FLASH=;Expires=Sat, 5-Nov-11 13:23:03 GMT;Path=/
PLAY_ERRORS=;Expires=Sat, 5-Nov-11 13:23:03 GMT;Path=/
PLAY_SESSION=173568528f604221761b8b9447afb9874260e402-%00___AT%3A7205f096798cddd5d1a2ff9ad83427161e19ac46%00;Path=/

Content-Length: 9750

So the PLAY_FLASH content is wiped out. There's nothing I've seen about this in the documentation and no mention elsewhere but it's quite a major issue for me, now I've found the culprit, and I'm suspecting others may have similar issues but may not have tracked it down yet. Static resources shouldn't be setting cookies really so I can't imagine this is anything other than a bug.