Set up a proper favicon.ico in both webcit-classic and webcit-ng with a version of...
[citadel.git] / webcit-ng / static.c
index f4aefa776a5879723937877c24e76a0e86304036..c34f12e3a74d0a0f9bd46d008b819edd467cbfe3 100644 (file)
@@ -20,12 +20,17 @@ void output_static(struct http_transaction *h) {
        char filename[PATH_MAX];
        struct stat statbuf;
 
+       syslog(LOG_DEBUG, "static: %s", h->url);
+
        if (!strncasecmp(h->url, "/ctdl/s/", 8)) {
                snprintf(filename, sizeof filename, "static/%s", &h->url[8]);
        }
        else if (!strncasecmp(h->url, "/.well-known/", 13)) {
                snprintf(filename, sizeof filename, "static/.well-known/%s", &h->url[13]);
        }
+       else if (!strcasecmp(h->url, "/favicon.ico")) {
+               snprintf(filename, sizeof filename, "static/images/favicon.ico");
+       }
        else {
                do_404(h);
                return;