Everywhere: Use session->path()
This commit is contained in:
parent
ff5a07dc04
commit
66074a5472
31 changed files with 48 additions and 48 deletions
|
@ -196,7 +196,7 @@ Bool @slon_activitypub_http_signature_is_valid(SlonHttpSession* session)
|
|||
++i;
|
||||
}
|
||||
sig_string_alloc_length += StrLen(session->verb(1));
|
||||
sig_string_alloc_length += StrLen(@slon_http_request_path(session));
|
||||
sig_string_alloc_length += StrLen(session->path());
|
||||
sig_string_alloc_length *= 2;
|
||||
|
||||
// Construct our signature string
|
||||
|
@ -207,7 +207,7 @@ Bool @slon_activitypub_http_signature_is_valid(SlonHttpSession* session)
|
|||
headers_split[i][0] += 'a' - headers_split[i][0];
|
||||
}
|
||||
if (!StrCmp("(request-target)", headers_split[i])) {
|
||||
String.Append(sig_string, "(request-target): %s %s", "post", @slon_http_request_path(session));
|
||||
String.Append(sig_string, "(request-target): %s %s", "post", session->path());
|
||||
} else {
|
||||
String.Append(sig_string, "%s: %s", headers_split[i], session->header(headers_split[i]));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ U0 @slon_web_user_get(SlonHttpSession* session)
|
|||
no_warn scratch_buffer, request_json;
|
||||
|
||||
I64 path_segments_count = 0;
|
||||
U8** path_segments = String.Split(StrFind("@", @slon_http_request_path(session)) + 1, '/', &path_segments_count);
|
||||
U8** path_segments = String.Split(StrFind("@", session->path()) + 1, '/', &path_segments_count);
|
||||
|
||||
U8* user = path_segments[0];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue