aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-06-19 11:57:05 -0400
committerGitHub <noreply@github.com>2020-06-19 11:57:05 -0400
commit854cc793861c31c395387a1197c40e840bc95826 (patch)
treebfa9c9fe59a9cb93a0df8193bc0c61890b2cb1c8 /components/script/script_thread.rs
parent5ad7e5b4fbd58b0503a32cb134a536ff634c6b5b (diff)
parenta0345ee1e6b0de93703eeec9b9ad92d33663fb96 (diff)
downloadservo-854cc793861c31c395387a1197c40e840bc95826.tar.gz
servo-854cc793861c31c395387a1197c40e840bc95826.zip
Auto merge of #26926 - MDeiml:referrer-26570, r=jdm
Make url for "client" referrer mandatory <!-- Please describe your changes on the following line: --> I added a url attribute to `Referrer::Client` so that the referrer header can be set accordingly when fetching. `Referrer::Client` has to be kept separate from `Referrer::ReferrerUrl` as they differ in this method https://github.com/servo/servo/blob/6b0d9afd6fdc28356ad44af0104ddd25a7b6438d/components/script/dom/request.rs#L566-L576 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #26570 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index da37b9b99f1..89acc25e720 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -3669,13 +3669,12 @@ impl ScriptThread {
/// argument until a notification is received that the fetch is complete.
fn pre_page_load(&self, mut incomplete: InProgressLoad, load_data: LoadData) {
let id = incomplete.pipeline_id.clone();
- let req_init = RequestBuilder::new(load_data.url.clone())
+ let req_init = RequestBuilder::new(load_data.url.clone(), load_data.referrer)
.method(load_data.method)
.destination(Destination::Document)
.credentials_mode(CredentialsMode::Include)
.use_url_credentials(true)
.pipeline_id(Some(id))
- .referrer(load_data.referrer)
.referrer_policy(load_data.referrer_policy)
.headers(load_data.headers)
.body(load_data.data)