|
@@ -19,9 +19,10 @@ int webfinger_request_signed(snac *snac, const char *qs, char **actor, char **us
|
|
|
xs_str *host = NULL;
|
|
|
xs *resource = NULL;
|
|
|
|
|
|
- if (xs_startswith(qs, "https:/" "/")) {
|
|
|
+ if (xs_startswith(qs, "http")) {
|
|
|
|
|
|
- xs *s = xs_replace_n(qs, "https:/" "/", "", 1);
|
|
|
+ xs *s1 = xs_replace_n(qs, "http:/" "/", "", 1);
|
|
|
+ xs *s = xs_replace_n(s1, "https:/" "/", "", 1);
|
|
|
|
|
|
l = xs_split_n(s, "/", 1);
|
|
|
|
|
@@ -69,7 +70,7 @@ int webfinger_request_signed(snac *snac, const char *qs, char **actor, char **us
|
|
|
&payload, &p_size, &ctype);
|
|
|
}
|
|
|
else {
|
|
|
- xs *url = xs_fmt("https:/" "/%s/.well-known/webfinger?resource=%s", host, resource);
|
|
|
+ xs *url = xs_fmt("http:/" "/%s/.well-known/webfinger?resource=%s", host, resource);
|
|
|
|
|
|
if (snac == NULL)
|
|
|
xs_http_request("GET", url, headers, NULL, 0, &status, &payload, &p_size, 0);
|
|
@@ -139,7 +140,7 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
|
|
|
snac snac;
|
|
|
int found = 0;
|
|
|
|
|
|
- if (xs_startswith(resource, "https:/" "/")) {
|
|
|
+ if (xs_startswith(resource, "https")) {
|
|
|
|
|
|
xs *l = xs_split(resource, "/");
|
|
|
char *uid = xs_list_get(l, -1);
|