summaryrefslogtreecommitdiffstats
path: root/net/src/async.rs
diff options
context:
space:
mode:
Diffstat (limited to 'net/src/async.rs')
-rw-r--r--net/src/async.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/src/async.rs b/net/src/async.rs
index df82a7aa..75885272 100644
--- a/net/src/async.rs
+++ b/net/src/async.rs
@@ -42,7 +42,8 @@ const DNS_WORKER: usize = 4;
impl KeyServer {
/// Returns a handle for the given URI.
pub fn new(ctx: &Context, uri: &str, _handle: &Handle) -> Result<Self> {
- let uri: Url = uri.parse()?;
+ let uri: Url = uri.parse()
+ .or_else(|_| format!("hkps://{}", uri).parse())?;
let client: Box<AClient> = match uri.scheme() {
"hkp" => Box::new(Client::new()),