@@ -1999,9 +1999,10 @@ set on a response requesting that the user agent invoke the
19991999<a method for=Attribution>measureConversion()</a> API.
20002000
20012001<div class=example id=ex-measure-conversion-header>
2002- This is the HTTP equivalent of <a href=#ex-measure-conversion>the JavaScript `measureConversion` example</a> :
2002+ This is the HTTP equivalent of <a href=#ex-measure-conversion>the JavaScript `measureConversion` example</a> ,
2003+ with the addition of a `report-url` to which the resulting report will be `POST`ed:
20032004<xmp highlight=http>
2004- Measure-Conversion: aggregation-service="https://aggregator.example/tee", histogram-size=20, epsilon=1.0, lookback-days=14, impression-sites=("publisher.example" "other.example"), impression-callers=("ad-tech.example"), match-values=(2), credit=(0.25 0.25 0.5), value=3, max-value=7
2005+ Measure-Conversion: aggregation-service="https://aggregator.example/tee", histogram-size=20, epsilon=1.0, lookback-days=14, impression-sites=("publisher.example" "other.example"), impression-callers=("ad-tech.example"), match-values=(2), credit=(0.25 0.25 0.5), value=3, max-value=7, report-url="https://report-handler.example/foo"
20052006</xmp>
20062007</div>
20072008
@@ -2070,13 +2071,18 @@ optional keys are populated the same way as the corresponding
20702071 Value of <a dict-member for=AttributionConversionOptions>maxValue</a> ,
20712072 a positive [=structured header/integer=] . This key is optional.
20722073 </dd>
2074+ <dt> <dfn noexport><code>report-url</code></dfn> </dt>
2075+ <dd>
2076+ A [=structured header/string=] containing the [=potentially trustworthy URL=]
2077+ to which the resulting report, if any, will be `POST`ed. The URL may be
2078+ relative to the request URL, and its [=url/scheme=] must be "`http`" or "`https`".
2079+ This key is required.
2080+ </dd>
20732081</dl>
20742082
2075- Issue: Add a required field indicating where to send the resulting report.
2076-
20772083<div algorithm>
20782084To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header value=]
2079- |input|, run these steps:
2085+ |input| and [=URL=] |baseUrl| , run these steps:
20802086
208120871. Let |dict| be the result of [=structured header/parsing structured fields=]
20822088 with <var ignore> input_bytes</var> set to |input| and
@@ -2086,6 +2092,12 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
208620921. If |aggregationService| is not a [=structured header/string=] , return an error.
208720931. Let |histogramSize| be |dict|["<code>[=measure-conversion/histogram-size=] </code> "] [=map/with default=] `undefined`.
208820941. If |histogramSize| is not a positive [=structured header/integer=] , return an error.
2095+ 1. Let |reportUrlString| be |dict|["<code>[=measure-conversion/report-url=] </code> "] [=map/with default=] `undefined`.
2096+ 1. If |reportUrlString| is not a [=structured header/string=] , return an error.
2097+ 1. Let |reportUrl| be the result of applying the [=URL parser=] to |reportUrlString|, with |baseUrl|.
2098+ 1. If |reportUrl| is failure, return an error.
2099+ 1. If |reportUrl| is not a [=potentially trustworthy URL=] , return an error.
2100+ 1. If |reportUrl|'s [=url/scheme=] is not "`http`" or "`https`", return an error.
208921011. Let |opts| be a new {{AttributionConversionOptions}} with the following items:
20902102 : {{AttributionConversionOptions/aggregationService}}
20912103 :: |aggregationService|
@@ -2133,6 +2145,8 @@ To <dfn noexport>parse a `Measure-Conversion` header</dfn> given a [=header valu
21332145 1. Set |opts|.{{AttributionConversionOptions/maxValue}} to |maxValue|.
213421461. Return |opts|.
21352147
2148+ Issue: Propagate |reportUrl| so that it can be used to send the resulting report.
2149+
21362150</div>
21372151
21382152
0 commit comments