Fix a bug when instance URL included a port
This commit is contained in:
parent
ac1a111d7b
commit
58fad0d414
@ -25,8 +25,7 @@ struct WebfingerQuery {
|
|||||||
|
|
||||||
#[get("/.well-known/webfinger?<query>")]
|
#[get("/.well-known/webfinger?<query>")]
|
||||||
fn webfinger(query: WebfingerQuery, conn: DbConn) -> Content<Result<String, &'static str>> {
|
fn webfinger(query: WebfingerQuery, conn: DbConn) -> Content<Result<String, &'static str>> {
|
||||||
let mut parsed_query = query.resource.split(":");
|
let mut parsed_query = query.resource.splitn(2, ":");
|
||||||
println!("{:?}", parsed_query.clone().collect::<Vec<&str>>());
|
|
||||||
let res_type = parsed_query.next().unwrap();
|
let res_type = parsed_query.next().unwrap();
|
||||||
let res = parsed_query.next().unwrap();
|
let res = parsed_query.next().unwrap();
|
||||||
if res_type == "acct" {
|
if res_type == "acct" {
|
||||||
|
Loading…
Reference in New Issue
Block a user