mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix typo on protocol handlers (#33565)
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
This commit is contained in:
parent
78370fa6d0
commit
c519a2cdb6
3 changed files with 10 additions and 10 deletions
|
@ -61,8 +61,8 @@ impl EmbedderMethods for EmbedderCallbacks {
|
|||
fn get_protocol_handlers(&self) -> ProtocolRegistry {
|
||||
let mut registry = ProtocolRegistry::default();
|
||||
registry.register("urlinfo", urlinfo::UrlInfoProtocolHander::default());
|
||||
registry.register("servo", servo_handler::ServoProtocolHander::default());
|
||||
registry.register("resource", resource::ResourceProtocolHander::default());
|
||||
registry.register("servo", servo_handler::ServoProtocolHandler::default());
|
||||
registry.register("resource", resource::ResourceProtocolHandler::default());
|
||||
registry
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ use net_traits::ResourceFetchTiming;
|
|||
use tokio::sync::mpsc::unbounded_channel;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ResourceProtocolHander {}
|
||||
pub struct ResourceProtocolHandler {}
|
||||
|
||||
impl ResourceProtocolHander {
|
||||
impl ResourceProtocolHandler {
|
||||
pub fn response_for_path(
|
||||
request: &mut Request,
|
||||
done_chan: &mut DoneChannel,
|
||||
|
@ -91,7 +91,7 @@ impl ResourceProtocolHander {
|
|||
}
|
||||
}
|
||||
|
||||
impl ProtocolHandler for ResourceProtocolHander {
|
||||
impl ProtocolHandler for ResourceProtocolHandler {
|
||||
fn load(
|
||||
&self,
|
||||
request: &mut Request,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Loads resources using a mapping from well-known shortcuts to resource: urls.
|
||||
//! Recognized shorcuts:
|
||||
//! Recognized shortcuts:
|
||||
//! - servo:newtab
|
||||
|
||||
use std::future::Future;
|
||||
|
@ -14,12 +14,12 @@ use net::protocols::ProtocolHandler;
|
|||
use net_traits::request::Request;
|
||||
use net_traits::response::Response;
|
||||
|
||||
use crate::desktop::protocols::resource::ResourceProtocolHander;
|
||||
use crate::desktop::protocols::resource::ResourceProtocolHandler;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ServoProtocolHander {}
|
||||
pub struct ServoProtocolHandler {}
|
||||
|
||||
impl ProtocolHandler for ServoProtocolHander {
|
||||
impl ProtocolHandler for ServoProtocolHandler {
|
||||
fn load(
|
||||
&self,
|
||||
request: &mut Request,
|
||||
|
@ -29,7 +29,7 @@ impl ProtocolHandler for ServoProtocolHander {
|
|||
let url = request.current_url();
|
||||
|
||||
match url.path() {
|
||||
"newtab" => ResourceProtocolHander::response_for_path(
|
||||
"newtab" => ResourceProtocolHandler::response_for_path(
|
||||
request,
|
||||
done_chan,
|
||||
context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue