views:

74

answers:

1

This is sort of a follow-up to http://stackoverflow.com/questions/2329395/why-are-my-cookies-containing-json-occasionally-malformed, which we have resolved.

I have a 3-value cookie, and we're url encoding the main value. The other two values are a timestamp and a hash. It looks like this in our response header:

foo=d=634027688530013385&v=%7b%22HasDog%22%3afalse%2c%22Greeting%22%3anull%2c%22RecentRecipes%22%3a%5b%5d%2c%22Remember%22%3afalse%7d&h=ARv5QGf4Cnftc4tFaPoy/VH8Pbo=; path=/; HttpOnly

In our logs, we see cases where we can't parse the three values correctly because the entire cookie is now encoded:

Cookie looks mangled: d%3D634027653097874122%26v%3D%7B%22HasAcceptedTerms%22%3Afalse%2C%22RecipeBoxCount%22%3A0%2C%22Remember%22%3Afalse%7D%26h%3DR85mJ%2FTdA6yrVe5pVCVpfG2jumM%3D

Unfortunately, we're not capturing the user agent to see if this is related to a specific browser.

I have several options to fix this. I just think the behavior is odd enough to warrant a question.

A: 

This may not be an answer but....

This is interesting and warrants a deeper look.

I would like to see a public facing test page that shows red or green with the cookie in bold text and then run it through http://browsercam.com.

I did this when I thought I had found a bug in mozilla's native json support. turns out I was right.

Get your testpage working for sure for sure before you fill out the form for a free trial (200 shots), set the resolution to 640/480 and select all browsers/platform, 182 distinct combinations, set a delay to allow the redirection to set the cookie and track down the culprit.

Or take the time and get on http://testswarm.com/.

Please do follow up on this.

Sky Sanders
Sorry to be so tardy getting back - swamped with other projects at work, so this has been relegated to "we'll get to it eventually" status. I think this is an excellent suggestion, and will follow up next week since I have another minor bug in that component to fix.
Stuart
@Stuart- Great, I look forward to your results. http://browsershots.org/ seems to be back up now as well.
Sky Sanders
Finally got the information we're looking for: it's an RSS reader that's doing this. MagpieRSS/0.61 (+http://magpierss.sf.net) and MagpieRSS/0.72 (+http://magpierss.sf.net). The site on sourceforge doesn't appear to be active, last download update in 2005.
Stuart
I was talking to a colleague just a few minutes ago and found out that he ran into this same problem. Turns out he had already figured out it was magpie. Too funny.
Stuart
@Stuart - magpie, huh? thats.. good to know? lol. Glad you got it figured out.
Sky Sanders