dup-keys-non-strings
This relates to #1902
Rationale
now throws an error if the headers key is not a string or duplicated
Changes
- added Tests
- added a guard for duplicate headers
- added a guard for non string header keys
Breaking Changes and Deprecations
Not sure, but this will block ALL requests that have headers which are not of type 'String' or are duplicated.
Status
- [x] I have read and agreed to the Developer's Certificate of Origin
- [x] Tested
- [ ] Benchmarked (optional)
- [ ] Documented
- [x] Review ready
- [ ] In review
- [ ] Merge ready
I think duplicate headers are allowed by the spec
Actually not sure what is correct here.
@ronag I think duplicates are only list values? https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2 https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
based on https://www.rfc-editor.org/rfc/rfc9110.html#name-field-lines-and-combined-fi
seems like keys CAN be duplicates as long as the values are an array. If i am understanding this correct, commit # 698e64e should fix this.
The actual commit still seems to have the implementation that throws on duplicate, can we verify we change it?