I promised in the docs that the HTML output directory would be
[sgt/agedu] / httpd.c
diff --git a/httpd.c b/httpd.c
index 62c1ceb..90d4e42 100644 (file)
--- a/httpd.c
+++ b/httpd.c
@@ -277,7 +277,7 @@ char *got_data(struct connctx *ctx, char *data, int length,
                ret = http_error("404", "Not Found", NULL,
                                 "This is not a valid pathname index.");
            } else {
-               document = html_query(ctx->t, index, cfg);
+               document = html_query(ctx->t, index, cfg, 1);
                if (document) {
                    ret = http_success("text/html", 1, document);
                    sfree(document);
@@ -430,6 +430,7 @@ void run_httpd(const void *t, int authmask, const struct httpd_config *dcfg,
        fprintf(stderr, "socket(PF_INET): %s\n", strerror(errno));
        exit(1);
     }
+    memset(&addr, 0, sizeof(addr));
     addr.sin_family = AF_INET;
     if (!dcfg->address) {
 #ifdef RANDOM_LOCALHOST