Closed Bug 1904557 Opened 5 months ago Closed 5 months ago

Unify and improve cookie warning messages

Categories

(Core :: Networking: Cookies, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

(Whiteboard: [necko-triaged])

Attachments

(3 files)

The current cookie parsing implementation generates several error and warning messages in case the cookies are invalid or not fully spec compliant. These messages are often confusing for the developer because they are not grouped and do not follow a particular order or priority.

I would suggest the following changes:

  1. Move the cookie parsing logic to a separate class: CookieParser.
  2. This class does not report warning/error messages during the parsing but, instead, it collects them
  3. Only at the end of the parsing the warning/error messages are reported following this logic:
  • if there is a cookie rejection, only the rejection message is printed
  • if the cookie is not rejected, all the warning messages are reported
  • the warning messages are grouped under a Cookie warnings console group.
Summary: Unify cookie warning messages → Unify and improve cookie warning messages
Assignee: nobody → amarchesini
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d3b18bb35281 part 1 - Improve cookie logging - Move cookie parser methods into a CookieParser class, r=timhuang,cookie-reviewers,edgul https://hg.mozilla.org/integration/autoland/rev/f8dfc2e9673f part 2 - Improve cookie logging - Move the warning/reject logic in CookieParser, r=timhuang,cookie-reviewers,edgul https://hg.mozilla.org/integration/autoland/rev/2ce77cdcbb97 part 3 - Improve cookie logging - Groupping the console warnings, r=timhuang,devtools-reviewers,cookie-reviewers,ochameau
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: