mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Add support for Upgrade request to a potentially trustworthy URL. (#34986)
* Add support for Upgrade request to a potentially trustworthy URL. Signed-off-by: Shubham Gupta <shubham13297@gmail.com> * script: Support inheritable insecure request policy in documents and workers. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Shubham Gupta <shubham13297@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Shubham Gupta <shubham.gupta@chromium.org> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
7b36f2beb3
commit
1e164738d8
57 changed files with 264 additions and 346 deletions
|
@ -13,7 +13,9 @@ use base::id::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
|||
use content_security_policy::Destination;
|
||||
use crossbeam_channel::Sender;
|
||||
use http::header;
|
||||
use net_traits::request::{CredentialsMode, RedirectMode, RequestBuilder, RequestMode};
|
||||
use net_traits::request::{
|
||||
CredentialsMode, InsecureRequestsPolicy, RedirectMode, RequestBuilder, RequestMode,
|
||||
};
|
||||
use net_traits::response::ResponseInit;
|
||||
use net_traits::{
|
||||
fetch_async, set_default_accept_language, BoxedFetchCallback, CoreResourceThread,
|
||||
|
@ -204,6 +206,11 @@ impl InProgressLoad {
|
|||
.use_url_credentials(true)
|
||||
.pipeline_id(Some(id))
|
||||
.referrer_policy(self.load_data.referrer_policy)
|
||||
.insecure_requests_policy(
|
||||
self.load_data
|
||||
.inherited_insecure_requests_policy
|
||||
.unwrap_or(InsecureRequestsPolicy::DoNotUpgrade),
|
||||
)
|
||||
.headers(self.load_data.headers.clone())
|
||||
.body(self.load_data.data.clone())
|
||||
.redirect_mode(RedirectMode::Manual)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue