diff options
author | default <nobody@localhost> | 2022-09-23 20:28:23 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-23 20:28:23 +0200 |
commit | 1d694a245a56bb4fd90fd917ad3648c2c5449746 (patch) | |
tree | cb96eb621ca84ebfdfba40cf859af477639f75d6 /httpd.c | |
parent | bbf5471039a973fed918441150ef76ff0db7682a (diff) |
xs_httpd_request() also returns the payload.
Diffstat (limited to 'httpd.c')
-rw-r--r-- | httpd.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -98,11 +98,13 @@ void httpd_connection(int rs) char *ctype = NULL; xs *headers = NULL; xs *q_path = NULL; + xs *payload = NULL; + int p_size; char *p; f = xs_socket_accept(rs); - req = xs_httpd_request(f); + req = xs_httpd_request(f, &payload, &p_size); { xs *j = xs_json_dumps_pp(req, 4); @@ -132,6 +134,9 @@ void httpd_connection(int rs) } else if (strcmp(method, "POST") == 0) { + if (status == 0) + status = activitypub_post_handler(req, q_path, + payload, p_size, &body, &b_size, &ctype); } /* let's go */ |