diff --git a/minimal-examples/http-server/minimal-http-server-eventlib-demos/minimal-http-server-eventlib-demos.c b/minimal-examples/http-server/minimal-http-server-eventlib-demos/minimal-http-server-eventlib-demos.c index 589581668..dd8e637ce 100644 --- a/minimal-examples/http-server/minimal-http-server-eventlib-demos/minimal-http-server-eventlib-demos.c +++ b/minimal-examples/http-server/minimal-http-server-eventlib-demos/minimal-http-server-eventlib-demos.c @@ -41,8 +41,28 @@ static struct lws_protocols protocols[] = { * mount handlers for sections of the URL space */ -static const struct lws_http_mount mount_ziptest = { +static const struct lws_http_mount mount_ziptest_uncomm = { NULL, /* linked-list pointer to next*/ + "/uncommziptest", /* mountpoint in URL namespace on this vhost */ + "./mount-origin/candide-uncompressed.zip", /* handler */ + NULL, /* default filename if none given */ + NULL, + NULL, + NULL, + NULL, + 0, + 0, + 0, + 0, + 0, + 0, + LWSMPRO_FILE, /* origin points to a callback */ + 14, /* strlen("/ziptest"), ie length of the mountpoint */ + NULL, + + { NULL, NULL } // sentinel +}, mount_ziptest = { + (struct lws_http_mount *)&mount_ziptest_uncomm, /* linked-list pointer to next*/ "/ziptest", /* mountpoint in URL namespace on this vhost */ "./mount-origin/candide.zip", /* handler */ NULL, /* default filename if none given */ @@ -61,9 +81,7 @@ static const struct lws_http_mount mount_ziptest = { NULL, { NULL, NULL } // sentinel -}; - -static const struct lws_http_mount mount_post = { +}, mount_post = { (struct lws_http_mount *)&mount_ziptest, /* linked-list pointer to next*/ "/formtest", /* mountpoint in URL namespace on this vhost */ "protocol-post-demo", /* handler */ @@ -83,10 +101,7 @@ static const struct lws_http_mount mount_post = { NULL, { NULL, NULL } // sentinel -}; - - -static const struct lws_http_mount mount = { +}, mount = { /* .mount_next */ &mount_post, /* linked-list "next" */ /* .mountpoint */ "/", /* mountpoint URL */ /* .origin */ "./mount-origin", /* serve from dir */ diff --git a/minimal-examples/http-server/minimal-http-server-eventlib-demos/mount-origin/candide-uncompressed.zip b/minimal-examples/http-server/minimal-http-server-eventlib-demos/mount-origin/candide-uncompressed.zip new file mode 100644 index 000000000..82cb48088 Binary files /dev/null and b/minimal-examples/http-server/minimal-http-server-eventlib-demos/mount-origin/candide-uncompressed.zip differ