Skip to content

Commit aa0d4f6

Browse files
authored
Further clarify post-request check
It was inconsistent with the pre-request check with regards to the handling of `strict-dynamic` in both case-sensitivity and parser metadata. Additionally, add a clarifying comment about why the post-request check also checks the request, to avoid confusion for implementers. Fixes w3c#727 Part of w3c#728
1 parent 2d2653d commit aa0d4f6

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

index.bs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,12 @@ Content-Type: application/reports+json
38003800
Given a request |request|, a response |response|,
38013801
a directive |directive|, and a policy |policy|:
38023802

3803+
Note: the check uses a |request| to determine whether it should match
3804+
the response |response| to the source-list. If the |request|'s
3805+
3806+
integrity metadata matches the source list, then
3807+
the |response| is allowed and matching to the source list is skipped.
3808+
38033809
1. If |request|'s destination is script-like:
38043810

38053811
1. Call [=potentially report hash=] with |response|, |request|, |directive| and |policy|.
@@ -3814,13 +3820,17 @@ Content-Type: application/reports+json
38143820
for="request">integrity metadata and this directive's
38153821
for="directive">value is "`Matches`", return "`Allowed`".
38163822

3817-
1. If |directive|'s value contains
3818-
3823+
1. If |directive|'s value contains a source
3824+
expression that is an ASCII case-insensitive match for
3825+
38193826

3820-
1. If |request|'s parser metadata is not
3821-
"parser-inserted", return "`Allowed`".
3827+
1. If the |request|'s parser metadata is
3828+
"parser-inserted", return "`Blocked`".
38223829

3823-
Otherwise, return "`Blocked`".
3830+
Otherwise, return "`Allowed`".
3831+
3832+
Note: "`'strict-dynamic'`" is explained in more detail
3833+
in [[#strict-dynamic-usage]].
38243834

38253835
1. If the result of executing [[#match-response-to-source-list]] on
38263836
|response|, |request|, |directive|'s value,

0 commit comments

Comments
 (0)