]> git.ipfire.org Git - thirdparty/curl.git/commit
cookie: cleanups and improvements
authorDaniel Stenberg <daniel@haxx.se>
Sun, 7 Dec 2025 22:44:31 +0000 (23:44 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Dec 2025 08:52:58 +0000 (09:52 +0100)
commita78a07d3a9dc808a51f464d0dd297939e544e2a4
tree0f1fbb5e699f517da4eedac4df355dab9a874ac1
parenta093c93994d2afed3beed94809844c961d3f4a64
cookie: cleanups and improvements

- Stricter cookie validation with earlier rejection of empty/invalid
  cookie names

- secure and httponly attributes no longer accept = with empty values
  (only bare keywords)

- Validation checks (length, TAB, prefixes) moved into the first
  name/value pair block for better code organization

- Deferred time(NULL) calls for better performance when expires/max-age
  aren't used

- Simplified loop control flow by removing done flag

- The cookie size restriction now only applies to name + value, not other
  parts of the header line.

- Fixed a gcc 4.8.1 quirk

Closes #19868
lib/cookie.c
tests/data/test1160
tests/data/test31