aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------libweb0
-rw-r--r--main.c14
2 files changed, 12 insertions, 2 deletions
diff --git a/libweb b/libweb
-Subproject b71a6174e12b4709acaf8bc151938ba12d2a54f
+Subproject dec953e4f4af89149685c7463c422ccca6174cb
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,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;