Skip to content

Remove unnecessary fields and URL parts #164

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

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 75 additions & 31 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ <h2>Dependencies</h2>
<p>The following terms are defined in the URL specification: [[URL]]</p>
<ul>
<li><dfn data-cite="!URL#concept-url-fragment">fragment</dfn></li>
<li><dfn data-cite="!URL#concept-host">host</dfn></li>
<li><dfn data-cite="!URL#concept-url-path">path</dfn></li>
<li><dfn data-cite="!URL#concept-url-query">query</dfn></li>
<li><dfn data-cite="!URL#concept-url">URL</dfn></li>
<li><dfn data-cite="!URL#concept-url-serializer">URL serializer</dfn></li>
</ul>
</dd>
</dl>
Expand Down Expand Up @@ -1089,21 +1091,49 @@ <h2>Extract response headers</h2>
following properties: [[ECMA-262]]

<dl>
<dt><code>referrer</code></dt>
<dt><code>sampling_fraction</code></dt>
<dd><var>sampling rate</var></dd>

<dt><code>elapsed_time</code></dt>
<dd>
<var>request</var>'s referrer, as determined by the <a>referrer
policy</a> associated with its <a>client</a>.
The elapsed number of milliseconds between the start of the resource
fetch and when it was completed or aborted by the user agent.
</dd>

<dt><code>sampling_fraction</code></dt>
<dd><var>sampling rate</var></dd>
<dt><code>phase</code></dt>
<dd>
If <var>request</var> <a>failed</a>, the
<a data-lt="type-phase">phase</a> of its <a>network error</a>. If
<var>request</var> <a>succeeded</a>, <code>"application"</code>.
</dd>

<dt><code>type</code></dt>
<dd>
If <var>request</var> <a>failed</a>, the <a>type</a> of its
<a>network error</a>. If <var>request</var> <a>succeeded</a>,
<code>"ok"</code>.
</dd>
</dl>
</li>

<li>
If <var>report body</var>'s <code>phase</code> property is not
<code>dns</code>, append the following properties to <var>report
body</var>:
<dl>
<dt><code>server_ip</code></dt>
<dd>The IP address of the <a>server</a> to which the user agent sent the request, if available. Otherwise, an empty string.
<ul>
<li>A host identified by an IPv4 address is represented in dotted-decimal notation (a sequence of four decimal numbers in the range 0 to 255, separated by "."). [[RFC1123]]</li>
<li>A host identified by an IPv6 address is represented as an ordered list of eight 16-bit pieces (a sequence of `x:x:x:x:x:x:x:x`, where the 'x's are one to four hexadecimal digits of the eight 16-bit pieces of the address). [[RFC4291]] </li>
</ul>
<dd>The IP address of the <a>server</a> to which the user agent sent
the request, if available. Otherwise, an empty string.
<ul>
<li>A host identified by an IPv4 address is represented in
dotted-decimal notation (a sequence of four decimal numbers in
the range 0 to 255, separated by "."). [[RFC1123]]</li>
<li>A host identified by an IPv6 address is represented as an
ordered list of eight 16-bit pieces (a sequence of
`x:x:x:x:x:x:x:x`, where the 'x's are one to four hexadecimal
digits of the eight 16-bit pieces of the address). [[RFC4291]]
</li>
</ul>
</dd>

<dt><code>protocol</code></dt>
Expand All @@ -1112,6 +1142,19 @@ <h2>Extract response headers</h2>
identified by the ALPN Protocol ID, if available. Otherwise,
<code>""</code>.
</dd>
</dl>
</li>

<li>
If <var>report body</var>'s <code>phase</code> property is not
<code>dns</code> or <code>connection</code>, append the following
properties to <var>report body</var>:
<dl>
<dt><code>referrer</code></dt>
<dd>
<var>request</var>'s referrer, as determined by the <a>referrer
policy</a> associated with its <a>client</a>.
</dd>

<dt><code>method</code></dt>
<dd><var>request</var>'s <a>request method</a>.</dd>
Expand All @@ -1133,26 +1176,6 @@ <h2>Extract response headers</h2>
The <a>status code</a> of the HTTP response, if available.
Otherwise, <code>0</code>.
</dd>

<dt><code>elapsed_time</code></dt>
<dd>
The elapsed number of milliseconds between the start of the resource
fetch and when it was completed or aborted by the user agent.
</dd>

<dt><code>phase</code></dt>
<dd>
If <var>request</var> <a>failed</a>, the
<a data-lt="type-phase">phase</a> of its <a>network error</a>. If
<var>request</var> <a>succeeded</a>, <code>"application"</code>.
</dd>

<dt><code>type</code></dt>
<dd>
If <var>request</var> <a>failed</a>, the <a>type</a> of its
<a>network error</a>. If <var>request</var> <a>succeeded</a>,
<code>"ok"</code>.
</dd>
</dl>
</li>

Expand Down Expand Up @@ -1236,6 +1259,22 @@ <h2>Extract response headers</h2>
</p>

<ol class="algorithm">
<li>
<p>Let <var>url</var> be <var>request</var>'s URL.</p>
</li>
<li>
<p>Clear <var>url</var>'s <a>fragment</a>.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a TODO or open an issue to rebase all this on Fetch and well defined concepts of what request's URL is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely; "Network request" is not well defined in this spec, and this should really be linked to RFC7232; However, Fetch is a much better fit for a W3C spec. Filed #166 for that.

</li>
<li>
<p>
If <var>report body</var>'s <code>phase</code> property is
<code>dns</code> or <code>connection</code>:</p>
<ol>
<li>
<p>Clear <var>url</var>'s <a>path</a> and <a>query</a>.</p>
</li>
</ol>
</li>
<li>
<p><a>Generate a network report</a> given these parameters:</p>

Expand All @@ -1246,8 +1285,13 @@ <h2>Extract response headers</h2>
<dd><var>report body</var></dd>
<dt>endpoint group</dt>
<dd><var>policy</var>'s <a>reporting group</a></dd>
<dt>url</dt>
<dd>The result of running the <a>URL serializer</a> on
<var>url</var>.
</dd>
</dl>
</li>

</ol>
</section>
</section>
Expand Down