diff --git a/libweb b/libweb index b71a617..dec953e 160000 --- a/libweb +++ b/libweb @@ -1 +1 @@ -Subproject commit b71a6174e12b4709acaf8bc151938ba12d2a54f6 +Subproject commit dec953e4f4af89149685c7463c422ccca6174cb8 diff --git a/main.c b/main.c index 0c7be51..3f712d6 100644 --- a/main.c +++ b/main.c @@ -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,11 +2089,21 @@ 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; end: