mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Let protocol handlers decide if they are fetchable (#33573)
This adds a 'is_fetchable()' method on the ProtocolHandler trait that is then used in the fetch code. The 'data:' protocol handler is updated to return true instead of hardcoding the scheme comparison, as well as the 'urlinfo:' handler since it's just a testing one. Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
5d269a9036
commit
f57ae60056
4 changed files with 34 additions and 5 deletions
|
@ -54,4 +54,8 @@ impl ProtocolHandler for DataProtocolHander {
|
|||
|
||||
Box::pin(std::future::ready(response))
|
||||
}
|
||||
|
||||
fn is_fetchable(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue