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

Added 304 CSP test and removed "content-*" prefix from headers to ignore on 304 #13579

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Oct 17, 2018

Also updated kNonUpdatedHeaders with more headers from the
nsHttpResponseHead file

Spec: https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch
Spec issue: w3c/webappsec-csp#161

While the spec does not give any list of content headers that should be ignored
on a 304 request, some of them are directly dependent on the resource body and
as such should not be updated (for example content-length cannot be different
since the content remains identical).

The exact list of ignored headers is identical to the one that firefox uses.

Bug: 174301
Change-Id: I8aab863b1f2733d051609e121539ad6acad36c6b
Reviewed-on: https://chromium-review.googlesource.com/c/1286427
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602001}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Added 304 CSP test and reworked logic for which headers to ignore on 304 Added 304 CSP test and removed "content-*" prefix from headers to ignore on 304 Oct 17, 2018
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1286427 branch 3 times, most recently from 4018f0d to f4c2826 Compare October 23, 2018 16:03
…ore on 304

Also updated kNonUpdatedHeaders with more headers from the
nsHttpResponseHead file

Spec: https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch
Spec issue: w3c/webappsec-csp#161

While the spec does not give any list of content headers that should be ignored
on a 304 request, some of them are directly dependent on the resource body and
as such should not be updated (for example `content-length` cannot be different
since the content remains identical).

The exact list of ignored headers is identical to the one that firefox uses.

Bug: 174301
Change-Id: I8aab863b1f2733d051609e121539ad6acad36c6b
Reviewed-on: https://chromium-review.googlesource.com/c/1286427
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602001}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants