diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1325,7 +1325,7 @@ static int upload(const struct http_payload *const p, fprintf(stderr, "%s: auth_cookie failed\n", __func__); return page_forbidden(r); } - else if (p->u.post.expect_continue) + else if (p->expect_continue) { *r = (const struct http_response) { @@ -2089,10 +2089,20 @@ int main(int argc, char *argv[]) .user = a }; + unsigned short outport; + if (!(h = handler_alloc(&cfg)) || add_urls(h, a) - || handler_listen(h, port)) + || handler_listen(h, port, &outport)) + goto end; + + printf("Listening on port %hu\n", outport); + + if (handler_loop(h)) + { + fprintf(stderr, "%s: handler_loop failed\n", __func__); goto end; + } ret = EXIT_SUCCESS; |
