Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Issue 17045: CookieMonster edge-case parsing improvements and tests. (Closed)

Created:
11 years, 11 months ago by Dean McNamee
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

CookieMonster quote parsing changes and tests. This fixes one bug where a cookie like: A="BBB" ; Would be "BBB"; in all other browser, but "BBB" ; in Chrome. Additionally it fixes creating unintentional (but harmless) empty attributes. We had previously tried to match Firefox, but after long discussions we decided it makes more sense to match Internet Explorer and Safari. This means not explicitly handling quoted-string as proposed in the newer RFCs. Before: A="B;C"; -> A="B;C"; After: A="B;C"; -> A="B;

Patch Set 1 #

Patch Set 2 : Ug that was awful #

Patch Set 3 : Ug #

Patch Set 4 : 80col #

Patch Set 5 : Keep double quote parsing. #

Patch Set 6 : Small english fixes. #

Total comments: 7

Patch Set 7 : Add the discussed EXPECT. #

Patch Set 8 : Back to the IE behavior. #

Patch Set 9 : English. #

Patch Set 10 : English. #

Total comments: 1

Patch Set 11 : Typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -45 lines) Patch
M net/base/cookie_monster.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M net/base/cookie_monster.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +29 lines, -31 lines 0 comments Download
M net/base/cookie_monster_unittest.cc View 1 2 3 4 5 6 7 8 chunks +68 lines, -14 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Dean McNamee
Oh man, what a mess. I forgot how awful cookies can be. I test on ...
11 years, 11 months ago (2009-01-02 16:01:22 UTC) #1
Dean McNamee
The RFCs seem to suggest that value can be a quoted string, however, in practice, ...
11 years, 11 months ago (2009-01-02 16:11:34 UTC) #2
Dean McNamee
Ok, one last note. There are no real RFCs for cookies. The above specify cookies ...
11 years, 11 months ago (2009-01-02 16:16:02 UTC) #3
Peter Kasting
On 2009/01/02 16:16:02, Dean McNamee wrote: > So we have to > decide, match an ...
11 years, 11 months ago (2009-01-05 20:43:01 UTC) #4
Dean McNamee
On 2009/01/05 20:43:01, pkasting wrote: > On 2009/01/02 16:16:02, Dean McNamee wrote: > > So ...
11 years, 11 months ago (2009-01-07 14:24:31 UTC) #5
Dean McNamee
I updated it to keep the double quote parsing. I am still unsure though, from ...
11 years, 11 months ago (2009-01-08 12:41:05 UTC) #6
Peter Kasting
Just commenting on desired behavior so we can nail that down before actually reviewing code. ...
11 years, 11 months ago (2009-01-08 17:57:33 UTC) #7
Dean McNamee
Yeah man, I dunno, it's all kinda gnarly. Half of me wants to go with ...
11 years, 11 months ago (2009-01-08 18:07:55 UTC) #8
Peter Kasting
I think my gut feeling is that since we don't truly treat quoted strings like ...
11 years, 11 months ago (2009-01-08 18:14:38 UTC) #9
Dean McNamee
On 2009/01/08 18:14:38, pkasting wrote: > I think my gut feeling is that since we ...
11 years, 11 months ago (2009-01-08 18:28:00 UTC) #10
Peter Kasting
Dean and I chatted some on IRC. We didn't reach any consensus on what behavior ...
11 years, 11 months ago (2009-01-08 19:06:31 UTC) #11
darin (slow to review)
On 2009/01/08 19:06:31, pkasting wrote: > At this point, I would like to hear Darin's ...
11 years, 11 months ago (2009-01-08 21:09:02 UTC) #12
lcamtuf
When it comes to the ";" affair, I am quite willing to make the claim ...
11 years, 11 months ago (2009-01-09 12:52:23 UTC) #13
Dean McNamee
On 2009/01/09 12:52:23, lcamtuf wrote: > When it comes to the ";" affair, I am ...
11 years, 11 months ago (2009-01-09 13:03:48 UTC) #14
Dean McNamee
1 2 3 4 I declare a thumb war. Ok, I just want to kill ...
11 years, 11 months ago (2009-01-09 13:13:19 UTC) #15
Dean McNamee
If we could go back in time and pick which behavior we thought was better, ...
11 years, 11 months ago (2009-01-09 13:22:32 UTC) #16
Dean McNamee
So after some more digging, basically the answer I got was this. The RFCs were ...
11 years, 11 months ago (2009-01-09 13:33:36 UTC) #17
Dean McNamee
Updated, all tests passing with Safari / IE behavior. It didn't really affect tests, which ...
11 years, 11 months ago (2009-01-09 14:11:14 UTC) #18
Peter Kasting
LGTM http://codereview.chromium.org/17045/diff/619/620 File net/base/cookie_monster.cc (right): http://codereview.chromium.org/17045/diff/619/620#newcode999 Line 999: // implement the Firefox behavior (A="B;C"; -> ...
11 years, 11 months ago (2009-01-09 18:02:53 UTC) #19
Dean McNamee
Good catch, fixed. Let's see what Darin thinks. On 2009/01/09 18:02:53, pkasting wrote: > LGTM ...
11 years, 11 months ago (2009-01-09 18:12:44 UTC) #20
darin (slow to review)
11 years, 11 months ago (2009-01-09 18:20:11 UTC) #21
LGTM

Powered by Google App Engine
This is Rietveld 408576698