Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spec] Duplicate adSlot detection and handling #903

Merged
merged 8 commits into from
Dec 8, 2023
8 changes: 7 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3900,9 +3900,15 @@ To <dfn>handle ad auction signals header value</dfn> given a [=byte sequence=] |
1. Let |parsedSignals| be the result of [=parsing JSON bytes to an Infra value=], given
|adAuctionSignals|.
1. If |parsedSignals| is failure or not a [=list=], return.
1. [=list/For each=] |signal| of |parsedSignals|:
1. Let |headerAdSlots| be a new [=ordered set=].
1. [=list/For each=] |signal| in |parsedSignals|:
1. If |signal| is not an [=ordered map=], [=iteration/continue=].
1. If |signal|["`adSlot`"] doesn't exist, [=iteration/continue=].
1. If |headerAdSlots| [=set/contains=] |signal|["`adSlot`"], [=iteration/continue=].

NOTE: Implementations can consider also issuing a diagnostic error message in this case
caraitto marked this conversation as resolved.
Show resolved Hide resolved
([:Ad-Auction-Signals:] header with duplicate `adSlot` dictionaries).
1. [=set/Append=] |signal|["`adSlot`"] to |headerAdSlots|.
1. Let |signalsKey| be a new [=direct from seller signals key=], with its
[=direct from seller signals key/seller=] set to |requestOrigin| and its
[=direct from seller signals key/ad slot=] set to |signal|["`adSlot`"].
Expand Down