Duplicate field verification improvement
Open
@bneradt is already working on this.
Since Jan 12, 2021.
- Dominant language
- C++
- Stars
- 47
- Forks
- 29
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 3
Description
We currently support duplicate field verification via this syntax:
- [ set-cookie,
[ "A1=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly",
"A3=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly" ],
equal ]
This applies the equal directive to each set-cookie duplicated field in the order listed. Only one directive type can be specified. We should at least support the new map syntax for this:
- [ set-cookie,
{ value: ["A1=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly",
"A3=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly" ],
as: equal } ]
And this would be really cool:
- [ set-cookie,
[
{ value: "A1=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly",
as: present },
{ value: "A3=d=AQABBO; Max-Age=31557600; Domain=.example.com; Path=/; SameSite=Lax; Secure; HttpOnly" ],
as: equal } ] ]
Thus different directives could be applied to each field. This latter is not likely easy to implement. Look into it.
Regardless of the mechanism settled upon, this must be documented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.