summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorGravatar default2022-09-28 05:22:08 +0200
committerGravatar default2022-09-28 05:22:08 +0200
commitb2c826400343cb0e56bf565b8b9c3072c998c22d (patch)
treefd9d89535e0c1c312b37be5ed2f18077250d4edb /httpd.c
parentCheck for muted actors in Announce messages. (diff)
downloadsnac2-b2c826400343cb0e56bf565b8b9c3072c998c22d.tar.gz
snac2-b2c826400343cb0e56bf565b8b9c3072c998c22d.tar.xz
snac2-b2c826400343cb0e56bf565b8b9c3072c998c22d.zip
Added dummy HTTP handlers for html.
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 447d30c..3ff13c6 100644
--- a/httpd.c
+++ b/httpd.c
@@ -127,20 +127,29 @@ void httpd_connection(int rs)
127 127
128 if (status == 0) 128 if (status == 0)
129 status = activitypub_get_handler(req, q_path, &body, &b_size, &ctype); 129 status = activitypub_get_handler(req, q_path, &body, &b_size, &ctype);
130
131 if (status == 0)
132 status = html_get_handler(req, q_path, &body, &b_size, &ctype);
130 } 133 }
131 else 134 else
132 if (strcmp(method, "POST") == 0) { 135 if (strcmp(method, "POST") == 0) {
133 if (status == 0) 136 if (status == 0)
134 status = activitypub_post_handler(req, q_path, 137 status = activitypub_post_handler(req, q_path,
135 payload, p_size, &body, &b_size, &ctype); 138 payload, p_size, &body, &b_size, &ctype);
139
140 if (status == 0)
141 status = html_post_handler(req, q_path,
142 payload, p_size, &body, &b_size, &ctype);
136 } 143 }
137 144
138 /* let's go */ 145 /* let's go */
139 headers = xs_dict_new(); 146 headers = xs_dict_new();
140 147
141 /* unattended? it's an error */ 148 /* unattended? it's an error */
142 if (status == 0) 149 if (status == 0) {
150 srv_debug(1, xs_fmt("httpd_connection unattended %s %s", method, q_path));
143 status = 404; 151 status = 404;
152 }
144 153
145 if (status == 404) 154 if (status == 404)
146 body = xs_str_new("<h1>404 Not Found</h1>"); 155 body = xs_str_new("<h1>404 Not Found</h1>");