You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SetCookieHeader in relic_core stores domain and path as Uri? and serializes them with Uri.toString(). This produces invalid Set-Cookie headers, since the Domain attribute must be a bare host (and Path a bare path), not a full URI.
Reported against relic_core ^1.2.0.
Reproduction
Constructing a SetCookieHeader with domain: Uri.parse('http://abc.co') (or Uri.parse('//abc.co')) and encoding it currently yields:
Per RFC 6265 section 4.1.1, Domain is <subdomain>: a plain hostname with no scheme, slashes, port, or path. Browsers may ignore such cookies or behave inconsistently. Expected:
Domain=abc.co
The same shape problem applies to Path, which is also typed as Uri? and serialized with toString().
Activity
fix(headers): Set-Cookie Domain uses Host, Path uses String