Cover trimmed comma-separated If-Match tokens
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
b520aa63f4
commit
482aeb7c57
1 file changed
+4
@@ -1028,6 +1028,10 @@ describe("ifMatchSatisfied", () => {
|
||||
expect(ifMatchSatisfied("\"foo\", *", "\"abc\"")).toBe(true);
|
||||
});
|
||||
|
||||
it("trims comma-separated header tokens before comparison", () => {
|
||||
expect(ifMatchSatisfied(" \"foo\" , \"abc\" ", "\"abc\"")).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects weak validators and mismatches", () => {
|
||||
expect(ifMatchSatisfied("W/\"abc\"", "\"abc\"")).toBe(false);
|
||||
expect(ifMatchSatisfied("w/\"abc\"", "\"abc\"")).toBe(false);
|
||||
|
||||
Reference in new issue
Block a user