headers@0.21.0
📦 remixView on GitHub →
✨ 2 features🐛 1 fixes🔧 7 symbols
Summary
This release introduces a new method for applying header initializations and fixes an issue regarding the ordering and retrieval of duplicate cookie names.
Migration Steps
- If relying on inferred return types for header value serialization methods, update code to use explicit return types.
- If needing to retrieve all cookie values for a given name, use Cookie#getAll(name) instead of relying on previous behavior of Cookie#get(name).
✨ New Features
- Added SuperHeaders#apply(init) to apply SuperHeadersInit values to an existing instance with header-aware behavior, preserving additive headers like Cookie, Set-Cookie, and Vary.
- Added explicit public API return types to header value serialization methods.
🐛 Bug Fixes
- Fixed Cookie and SuperHeaders.cookie to preserve duplicate cookie names from path- or domain-specific cookies in order. Cookie#get(name) now returns the first matching value, Cookie#getAll(name) reads every matching value, and Cookie#append(name, value) adds another cookie with the same name.