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
{{ message }}
Repository navigation
Consider relaxing wildcard validation strictness in WildcardListHeader for parsing #160
The current WildcardListHeader<T> implementation strictly rejects mixing * with other values during both parsing and generation:
if (splitValues.length >1&& splitValues.contains('*')) {
throwconstFormatException('Wildcard (*) cannot be used with other values');
}
While this prevents semantically meaningless combinations (e.g., Access-Control-Allow-Headers: *, Content-Type), it may be too strict for parsing headers from external sources.
Design Tension
Generation: We want to prevent creating semantically contradictory headers Parsing: We want to handle syntactically valid but semantically questionable input gracefully
This follows the "be liberal in what you accept, conservative in what you send" principle.
Potential Solutions
Separate validation paths: Allow mixed wildcards during parsing but prevent them during construction
Parse permissively, expose conservatively: Parse everything but provide methods to detect/handle semantic issues
Configuration-based: Make wildcard strictness configurable per header type
Current approach: Stay strict on both sides (status quo)
Context
Discussion originated in PR #159 regarding the base class design for wildcard-enabled headers.
Activity