summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorjuga <juga@sequoia-pgp.org>2019-06-19 09:37:04 +0000
committerJustus Winter <justus@sequoia-pgp.org>2019-08-20 10:38:03 +0200
commit26bf7c82dfe9624e5053f61667f017d761b08901 (patch)
tree767852f2cbfbf4b9cb17bbe37564533846067c47 /net
parentc29d66675264dd68db013367f4f3b842b1377569 (diff)
net: Remove unneeded port in WKD URL
- Closes #314.
Diffstat (limited to 'net')
-rw-r--r--net/src/wkd.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/src/wkd.rs b/net/src/wkd.rs
index cdbf4e6c..a2665fcc 100644
--- a/net/src/wkd.rs
+++ b/net/src/wkd.rs
@@ -113,11 +113,11 @@ impl Url {
where T: Into<Option<bool>> {
let direct_method = direct_method.into().unwrap_or(false);
if direct_method {
- format!("https://{}/.well-known/openpgpkey/hu/{}?l={}:443",
+ format!("https://{}/.well-known/openpgpkey/hu/{}?l={}",
self.domain, self.local_encoded, self.local_part)
} else {
format!("https://openpgpkey.{}/.well-known/openpgpkey/{}/hu/{}\
- ?l={}:443", self.domain, self.domain, self.local_encoded,
+ ?l={}", self.domain, self.domain, self.local_encoded,
self.local_part)
}
}
@@ -296,7 +296,7 @@ mod tests {
let expected_url =
"https://openpgpkey.example.com/\
.well-known/openpgpkey/example.com/hu/\
- stnkabub89rpcphiz4ppbxixkwyt1pic?l=test1:443";
+ stnkabub89rpcphiz4ppbxixkwyt1pic?l=test1";
let wkd_url = Url::from("test1@example.com").unwrap();
assert_eq!(expected_url, wkd_url.clone().to_string());
assert_eq!(url::Url::parse(expected_url).unwrap(),
@@ -308,7 +308,7 @@ mod tests {
let expected_url =
"https://example.com/\
.well-known/openpgpkey/hu/\
- stnkabub89rpcphiz4ppbxixkwyt1pic?l=test1:443";
+ stnkabub89rpcphiz4ppbxixkwyt1pic?l=test1";
assert_eq!(expected_url, wkd_url.clone().build(true));
assert_eq!(url::Url::parse(expected_url).unwrap(),
wkd_url.clone().to_url(true).unwrap());