From 1391d36d39eab03ca180475d48175abc0150f44d Mon Sep 17 00:00:00 2001 From: Yao Xiao Date: Tue, 14 Nov 2023 15:58:52 -0500 Subject: [PATCH] Add double-check when handling the response --- spec.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec.bs b/spec.bs index f2b1c81..c48530c 100644 --- a/spec.bs +++ b/spec.bs @@ -639,10 +639,10 @@ spec: html; urlPrefix: https://www.rfc-editor.org/rfc/
To handle topics response, given a [=response=] |response| and a [=request=] request: - - 1. If |request|'s [=request/header list=] does not [=list/contain=] [:Sec-Browsing-Topics:] (implying the |request|'s [=request/current URL=] is not eligible for topics), then return. 1. Let |topLevelDocument| be |request|'s [=request/window=]'s [=environment settings object/global object=]'s [=Window/navigable=]'s [=navigable/top-level traversable=]'s [=navigable/active document=]. - 1. Let |callerDomain| be |request|'s [=request/current URL=]'s [=url/origin=]'s [=origin/host=]'s [=host/registrable domain=]. + 1. let |callerOrigin| be |request|'s [=request/current URL=]'s [=url/origin=]. + 1. If the user preference setting or other user agent-defined mechanisms like enrollment disallow access to topics from |topLevelDocument| given |callerOrigin|, then return. + 1. Let |callerDomain| be |callerOrigin|'s [=origin/host=]'s [=host/registrable domain=]. 1. Let |list| be |response|'s [=response/header list=]. 1. Let |observe| be the result of running [=get a structured field value=] algorithm given [:Observe-Browsing-Topics:], "item", and |list| as input. 1. If |observe| is true: