Fix: handle malformed cookies gracefully
When a cookie with an invalid value is present (e.g., containing invalid URI sequences), `Astro.cookies.get()` now returns the raw cookie value instead of throwing a URIError. This aligns with the behavior of the underlying `cookie` package and prevents crashes when manually-set or corrupted cookies are encountered.
Closes #14448
8b465dc
4 days ago
by matthewp
-0.14%
test: add unit test for malformed cookie handling
Add test to verify that Astro.cookies.get() handles malformed cookie values gracefully by returning the unparsed value instead of throwing an error.