mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Redirect document loads manually
This commit is contained in:
parent
779edd7c4a
commit
541baafe1c
17 changed files with 376 additions and 52 deletions
|
@ -42,7 +42,7 @@ use ipc_channel::Error as IpcError;
|
|||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use request::{Request, RequestInit};
|
||||
use response::{HttpsState, Response};
|
||||
use response::{HttpsState, Response, ResponseInit};
|
||||
use servo_url::ServoUrl;
|
||||
use std::error::Error;
|
||||
use storage_thread::StorageThreadMsg;
|
||||
|
@ -369,6 +369,8 @@ pub struct WebSocketConnectData {
|
|||
#[derive(Deserialize, Serialize)]
|
||||
pub enum CoreResourceMsg {
|
||||
Fetch(RequestInit, IpcSender<FetchResponseMsg>),
|
||||
/// Initiate a fetch in response to processing a redirection
|
||||
FetchRedirect(RequestInit, ResponseInit, IpcSender<FetchResponseMsg>),
|
||||
/// Try to make a websocket connection to a URL.
|
||||
WebsocketConnect(WebSocketCommunicate, WebSocketConnectData),
|
||||
/// Store a cookie for a given originating URL
|
||||
|
@ -435,6 +437,9 @@ pub struct Metadata {
|
|||
|
||||
/// Referrer Url
|
||||
pub referrer: Option<ServoUrl>,
|
||||
|
||||
/// Referrer Policy of the Request used to obtain Response
|
||||
pub referrer_policy: Option<ReferrerPolicy>,
|
||||
}
|
||||
|
||||
impl Metadata {
|
||||
|
@ -449,6 +454,7 @@ impl Metadata {
|
|||
status: Some((200, b"OK".to_vec())),
|
||||
https_state: HttpsState::None,
|
||||
referrer: None,
|
||||
referrer_policy: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue