mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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>
This commit is contained in:
parent
b87a0db497
commit
8b115c246c
4 changed files with 28 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue