kinetex - v1.0.0-rc.1
    Preparing search index...

    Function splitSetCookieHeaders

    • Split a raw Set-Cookie header value (or collapsed multi-value string) into individual cookie strings.

      This is non-trivial because:

      • Expires values contain commas: "Expires=Thu, 01 Jan 2099 00:00:00 GMT"
      • Multiple Set-Cookie headers may be collapsed with ", " by some HTTP stacks

      Strategy: Token-based state machine that properly handles:

      • Quoted values with commas inside (e.g., foo="bar,baz")
      • Escaped quotes inside quoted values (e.g., foo="bar\"baz")
      • Attribute values that may contain commas
      • Only commits a cookie when we've seen both name and value

      Parameters

      • raw: string

        Raw Set-Cookie header string (possibly containing multiple cookies)

      Returns string[]

      Array of individual Set-Cookie strings