Skip to content

Commit

Permalink
Duplicate adSlot detection and handling (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
caraitto authored Dec 8, 2023
1 parent 820763e commit b821120
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3910,9 +3910,14 @@ 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. Let |headerAdSlots| be a new [=ordered set=].
1. [=list/For each=] |signal| of |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=]. Optionally,
[=report a warning to the console=] with a diagnostic error message indicating that a
duplicate [:Ad-Auction-Signals:] `adSlot` dictionary was ignored.
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

0 comments on commit b821120

Please sign in to comment.