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

Update request's referrer policy when fetching #280

Merged
merged 3 commits into from
Apr 14, 2016
Merged

Conversation

yutakahirano
Copy link
Member

With this change request's referrer policy is updated before calculating referrer so that the referrer policy actually used for the referrer calculation is transferred to the service worker and the default referrer policy is not transferred to the service worker.

This change fixes #266.

@yutakahirano
Copy link
Member Author

@annevk @estark37 @jeisinger

@yutakahirano
Copy link
Member Author

With this change item 3.2 in https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer can be rewritten as "Let policy be requests's referrer policy", I think (see also: w3c/webappsec-referrer-policy#26).

is the empty string and <var>request</var>'s
<span title=concept-request-client>client</span> is non-null, set <var>request</var>'s
<span title=concept-request-referrer-policy>referrer policy</span> to <var>request</var>'s
<span title=concept-request-client>client</span>'s associated referrer policy.
Copy link
Member

Choose a reason for hiding this comment

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

Where is "associated referrer policy" defined? Would be nice to directly reference it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I expected it would be added to https://www.w3.org/TR/html5/webappapis.html#settings-object by webappsec-referrer-policy authors in the future. Should I link to https://w3c.github.io/webappsec-referrer-policy/#referrer-policy?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think that would be good enough for now. Bit weird that they link to W3C HTML, which is hopelessly wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a link.

@annevk
Copy link
Member

annevk commented Apr 13, 2016

Would love a final sign-off by @estark37 or @jeisinger too just to make sure we're not missing anything. (When you look at the diff, search for "Overview.src.html" for the easier to review set of changes.)

@estark37
Copy link
Contributor

This looks good to me.

@annevk annevk merged commit 2812f6a into master Apr 14, 2016
@annevk annevk deleted the referrer-policy-change branch April 14, 2016 08:12
@annevk
Copy link
Member

annevk commented Apr 14, 2016

Thank you both!

estark37 added a commit to estark37/webappsec-referrer-policy that referenced this pull request Apr 21, 2016
This cleans up the Fetch integration in the following ways:

- Integrate the handling of Referrer-Policy headers on redirects with
  the HTTP-redirect fetch algorithm. This (I think) removes the need for
  responses to have associated referrer policies, and is also more
  precise/clean.

- Insert a TODO to define an HTML integration for the referrerpolicy
  content attributes. This removes the need for handwavy handling of the
  attribute when determining the Referer for a request.

- Use the request's referrer policy when determining the Referer for a
  request (no need to consult the environment's policy because that is
  now accounted for in Fetch as of
  whatwg/fetch#280). Issue 26
estark37 added a commit to estark37/webappsec-referrer-policy that referenced this pull request Apr 28, 2016
This cleans up the Fetch integration in the following ways:

- Integrate the handling of Referrer-Policy headers on redirects with
  the HTTP-redirect fetch algorithm. This (I think) removes the need for
  responses to have associated referrer policies, and is also more
  precise/clean.

- Insert a TODO to define an HTML integration for the referrerpolicy
  content attributes. This removes the need for handwavy handling of the
  attribute when determining the Referer for a request.

- Use the request's referrer policy when determining the Referer for a
  request (no need to consult the environment's policy because that is
  now accounted for in Fetch as of
  whatwg/fetch#280). Issue 26
estark37 added a commit to estark37/webappsec-referrer-policy that referenced this pull request Apr 28, 2016
This cleans up the Fetch integration in the following ways:

- Integrate the handling of Referrer-Policy headers on redirects with
  the HTTP-redirect fetch algorithm. This (I think) removes the need for
  responses to have associated referrer policies, and is also more
  precise/clean.

- Insert a TODO to define an HTML integration for the referrerpolicy
  content attributes. This removes the need for handwavy handling of the
  attribute when determining the Referer for a request.

- Use the request's referrer policy when determining the Referer for a
  request (no need to consult the environment's policy because that is
  now accounted for in Fetch as of
  whatwg/fetch#280). Issue 26
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.

Referrer policy: Should request's referrer policy be updated in the main fetch?
3 participants