diff options
-rw-r--r-- | activitypub.c | 6 | ||||
-rw-r--r-- | data.c | 2 | ||||
-rw-r--r-- | html.c | 6 | ||||
-rw-r--r-- | httpd.c | 2 | ||||
-rw-r--r-- | snac.h | 14 |
5 files changed, 17 insertions, 13 deletions
diff --git a/activitypub.c b/activitypub.c index 13b1ce2..86d33df 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1426,7 +1426,7 @@ int process_queue(void) /** HTTP handlers */ -int activitypub_get_handler(d_char *req, char *q_path, +int activitypub_get_handler(const xs_dict *req, const char *q_path, char **body, int *b_size, char **ctype) { int status = 200; @@ -1519,8 +1519,8 @@ int activitypub_get_handler(d_char *req, char *q_path, } -int activitypub_post_handler(d_char *req, char *q_path, - d_char *payload, int p_size, +int activitypub_post_handler(const xs_dict *req, const char *q_path, + char *payload, int p_size, char **body, int *b_size, char **ctype) /* processes an input message */ { @@ -1814,7 +1814,7 @@ static xs_dict *_new_qmsg(const char *type, const xs_val *msg, int retries) } -void enqueue_input(snac *snac, xs_dict *msg, xs_dict *req, int retries) +void enqueue_input(snac *snac, const xs_dict *msg, const xs_dict *req, int retries) /* enqueues an input message */ { xs *qmsg = _new_qmsg("input", msg, retries); @@ -1289,7 +1289,8 @@ xs_str *html_notifications(snac *snac) } -int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char **ctype) +int html_get_handler(const xs_dict *req, const char *q_path, + char **body, int *b_size, char **ctype) { char *accept = xs_dict_get(req, "accept"); int status = 404; @@ -1546,7 +1547,8 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char * } -int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, +int html_post_handler(const xs_dict *req, const char *q_path, + char *payload, int p_size, char **body, int *b_size, char **ctype) { int status = 0; @@ -43,7 +43,7 @@ d_char *nodeinfo_2_0(void) } -int server_get_handler(d_char *req, char *q_path, +int server_get_handler(xs_dict *req, char *q_path, char **body, int *b_size, char **ctype) /* basic server services */ { @@ -155,7 +155,7 @@ void inbox_add(const char *inbox); void inbox_add_by_actor(const xs_dict *actor); xs_list *inbox_list(void); -void enqueue_input(snac *snac, xs_dict *msg, xs_dict *req, int retries); +void enqueue_input(snac *snac, const xs_dict *msg, const xs_dict *req, int retries); void enqueue_output_raw(const char *keyid, const char *seckey, xs_dict *msg, xs_str *inbox, int retries); void enqueue_output(snac *snac, xs_dict *msg, xs_str *inbox, int retries); @@ -187,7 +187,7 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err); void httpd(void); int webfinger_request(const char *qs, char **actor, char **user); -int webfinger_get_handler(d_char *req, char *q_path, +int webfinger_get_handler(xs_dict *req, char *q_path, char **body, int *b_size, char **ctype); const char *default_avatar_base64(void); @@ -220,17 +220,19 @@ int process_user_queue(snac *snac); void process_queue_item(xs_dict *q_item); int process_queue(void); -int activitypub_get_handler(d_char *req, char *q_path, +int activitypub_get_handler(const xs_dict *req, const char *q_path, char **body, int *b_size, char **ctype); -int activitypub_post_handler(d_char *req, char *q_path, +int activitypub_post_handler(const xs_dict *req, const char *q_path, char *payload, int p_size, char **body, int *b_size, char **ctype); d_char *not_really_markdown(const char *content); d_char *sanitize(const char *str); -int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char **ctype); -int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, +int html_get_handler(const xs_dict *req, const char *q_path, + char **body, int *b_size, char **ctype); +int html_post_handler(const xs_dict *req, const char *q_path, + char *payload, int p_size, char **body, int *b_size, char **ctype); int snac_init(const char *_basedir); |