Fix a bug when instance URL included a port

This commit is contained in:
Bat 2018-05-02 14:05:26 +01:00
parent ac1a111d7b
commit 58fad0d414
1 changed files with 1 additions and 2 deletions

View File

@ -25,8 +25,7 @@ struct WebfingerQuery {
#[get("/.well-known/webfinger?<query>")]
fn webfinger(query: WebfingerQuery, conn: DbConn) -> Content<Result<String, &'static str>> {
let mut parsed_query = query.resource.split(":");
println!("{:?}", parsed_query.clone().collect::<Vec<&str>>());
let mut parsed_query = query.resource.splitn(2, ":");
let res_type = parsed_query.next().unwrap();
let res = parsed_query.next().unwrap();
if res_type == "acct" {