diff options
| m--------- | libweb | 0 | ||||
| -rw-r--r-- | main.c | 14 |
2 files changed, 12 insertions, 2 deletions
diff --git a/libweb b/libweb -Subproject b71a6174e12b4709acaf8bc151938ba12d2a54f +Subproject dec953e4f4af89149685c7463c422ccca6174cb @@ -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; |
