### Describe the bug A `HeaderAccessor<T>` is associated with a `Codec<T>` that handles encoding and decoding to `String`. It is paramount that all headers roundtrip, meaning that encoding and decoding a header instance will give you a logically equivalent instance. Most headers already does this correctly, but there are exceptions. We should add test to expose this, and fix all headers in conflict. ### To reproduce Example: ```dart final x == VaryHeader.wildcard(); final r = Headers.vary.codec.encode(x); final y == Headers.vary.codec.decode(r); print(x == y); // <-- prints false! ``` ### Expected behavior Round-tripping headers should always result in a logically equal instances. ### Library version `relic: 0.5.0` (and prior) ### Platform information any ### Additional context _No response_ ### How experienced are you with this library? Expert - Experienced and comfortable with using this library in complex projects ### Are you interested in working on a PR for this? - [x] I want to work on this
Activity
nielsenko commentedon Sep 3, 2025
This is somewhat related to #143 , but even with that fixed, some headers simply don't encode and decode correctly.
nielsenko commentedon Sep 3, 2025
So far the examples I have seen has been down to constructing invalid header instances in the first place (see #145)
[-]bug: Not all headers roundtrip correctly[/-][+]Not all headers roundtrip correctly[/+]