summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 1ef766c..037f690 100644
--- a/httpd.c
+++ b/httpd.c
@@ -98,11 +98,13 @@ void httpd_connection(int rs)
98 char *ctype = NULL; 98 char *ctype = NULL;
99 xs *headers = NULL; 99 xs *headers = NULL;
100 xs *q_path = NULL; 100 xs *q_path = NULL;
101 xs *payload = NULL;
102 int p_size;
101 char *p; 103 char *p;
102 104
103 f = xs_socket_accept(rs); 105 f = xs_socket_accept(rs);
104 106
105 req = xs_httpd_request(f); 107 req = xs_httpd_request(f, &payload, &p_size);
106 108
107 { 109 {
108 xs *j = xs_json_dumps_pp(req, 4); 110 xs *j = xs_json_dumps_pp(req, 4);
@@ -132,6 +134,9 @@ void httpd_connection(int rs)
132 } 134 }
133 else 135 else
134 if (strcmp(method, "POST") == 0) { 136 if (strcmp(method, "POST") == 0) {
137 if (status == 0)
138 status = activitypub_post_handler(req, q_path,
139 payload, p_size, &body, &b_size, &ctype);
135 } 140 }
136 141
137 /* let's go */ 142 /* let's go */