diff options
author | Jason Tsai <git@pews.dev> | 2025-01-03 14:35:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-03 06:35:16 +0000 |
commit | 8b115c246c752f5a06b33fe7abb492bb2b8919c4 (patch) | |
tree | 9eaec87878469cf3f35abc2c3ddb32077b17a38b /components/script/script_thread.rs | |
parent | b87a0db49707d79aeddd825b3374e67d46f02da7 (diff) | |
download | servo-8b115c246c752f5a06b33fe7abb492bb2b8919c4.tar.gz servo-8b115c246c752f5a06b33fe7abb492bb2b8919c4.zip |
fix: add source browsing context to `Request` and HTTP credentials prompt (#34808)
* fix: add source browsing ctx id to request when initiate navigation
Signed-off-by: Jason Tsai <git@pews.dev>
* chore: clippy
Signed-off-by: Jason Tsai <git@pews.dev>
* Update components/net/http_loader.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Jason Tsai <git@pews.dev>
* chore: apply suggestions
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Jason Tsai <git@pews.dev>
* chore: fix naming
Signed-off-by: Jason Tsai <git@pews.dev>
* refactor: set request browsing ctx id on pre page load
Signed-off-by: Jason Tsai <git@pews.dev>
---------
Signed-off-by: Jason Tsai <git@pews.dev>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 88e0d5f8803..29ceee67501 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -3505,6 +3505,7 @@ 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; + let top_level_browsing_context_id = incomplete.top_level_browsing_context_id; let req_init = RequestBuilder::new(load_data.url.clone(), load_data.referrer) .method(load_data.method) .destination(Destination::Document) @@ -3512,6 +3513,7 @@ impl ScriptThread { .credentials_mode(CredentialsMode::Include) .use_url_credentials(true) .pipeline_id(Some(id)) + .target_browsing_context_id(Some(top_level_browsing_context_id)) .referrer_policy(load_data.referrer_policy) .headers(load_data.headers) .body(load_data.data) |