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

Add http method to fetch timing info #1632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sohomdatta1
Copy link

@sohomdatta1 sohomdatta1 commented Apr 17, 2023

This change will allow for the addition of the http method to the resource-timing spec

Explainer: https://github.com/sohomdatta1/rt-explainer
Associated resource-timing PR: w3c/resource-timing#375

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (not for CORS changes): …
  • MDN issue is filed: …

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@sohomdatta1 sohomdatta1 changed the title fix: Add http method to fetch timing info Add: Add http method to fetch timing info Apr 17, 2023
This change will allow for the addition of
the http method to the resource-timing spec

Explainer: https://github.com/rt-explainer
Associated resource-timing PR: w3c/resource-timing#375
@sohomdatta1 sohomdatta1 changed the title Add: Add http method to fetch timing info Add http method to fetch timing info Apr 17, 2023
@@ -4231,7 +4233,9 @@ the response. [[!HTTP-CACHING]]
<li><p>Let <var>timingInfo</var> be a new <a for=/>fetch timing info</a> whose
<a for="fetch timing info">start time</a> and
<a for="fetch timing info">post-redirect start time</a> are the
<a for=/>coarsened shared current time</a> given <var>crossOriginIsolatedCapability</var>, and
<a for=/>coarsened shared current time</a> given <var>crossOriginIsolatedCapability</var>,
<a for="fetch timing info">http method</a> is set to <var>request</var>'s
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we don't need the method info to be hidden when opaque, you may also want to add it to https://fetch.spec.whatwg.org/#create-an-opaque-timing-info.
^^ @noamr for thoughts

@annevk
Copy link
Member

annevk commented Apr 17, 2023

The explainer link is a 404. Is it https://github.com/sohomdatta1/rt-explainer?

I think this should be called requestMethod or just method. (See also responseStatus.)

Also, a method can change due to redirects, but this won't pick that up.

@sohomdatta1
Copy link
Author

sohomdatta1 commented Apr 17, 2023

The explainer link is a 404. Is it https://github.com/sohomdatta1/rt-explainer?

That is the correct link, I have updated the description

I think this should be called requestMethod or just method. (See also responseStatus.)

Also, a method can change due to redirects, but this won't pick that up.

Can you point me to which cases the redirect would change the method being used?
Also, does this mean we should restrict this behind CORS (given that reporting a different HTTP method could be considered a leak of whether or not a redirect occurred)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants