URI: 
       Add zuccless support. - bitreich-httpd - Bitreich HTTPD service
  HTML git clone git://bitreich.org/bitreich-httpd git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-httpd
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
   DIR LICENSE
       ---
   DIR commit 0f24889dc4f0b3982034d9c4ff58e73f8abe3e16
   DIR parent 24b9dc39989a25a24c9c612490da39f05303e633
  HTML Author: Christoph Lohmann <20h@r-36.net>
       Date:   Sun, 31 Jul 2022 01:30:15 +0200
       
       Add zuccless support.
       
       Diffstat:
         M bitreich-httpd.c                    |      12 +++++++++++-
       
       1 file changed, 11 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/bitreich-httpd.c b/bitreich-httpd.c
       @@ -105,7 +105,7 @@ int
        main(int argc, char *argv[])
        {
                char *wwwbase, *wwwindex, request[512], *ctype, *path,
       -             clienth[NI_MAXHOST], clientp[NI_MAXSERV];
       +             clienth[NI_MAXHOST], clientp[NI_MAXSERV], *zuccbase;
                int rlen;
                struct sockaddr_storage clt;
                socklen_t cltlen = sizeof(clt);
       @@ -113,6 +113,8 @@ main(int argc, char *argv[])
                wwwbase = "/bitreich/www";
                wwwindex = "index.html";
        
       +        zuccbase = "/br/www/zuccless";
       +
                if (!getpeername(0, (struct sockaddr *)&clt, &cltlen)) {
                        if (getnameinfo((struct sockaddr *)&clt, cltlen, clienth,
                                                sizeof(clienth), clientp, sizeof(clientp),
       @@ -162,7 +164,15 @@ main(int argc, char *argv[])
                        sleep(1);
                        asprintf(&path, "%s/s/yolo-css.css", wwwbase);
                        ctype = "text/css";
       +        } else if (strstr(request, "zucc-meat.webm")) {
       +                asprintf(&path, "%s/zucc-meat.webm", zuccbase);
       +                ctype = "video/webm";
                } else {
       +                if (strstr(request, "Host: www.zuccless.org"))
       +                        wwwbase = zuccbase;
       +                if (strstr(request, "Host: zuccless.org"))
       +                        wwwbase = zuccbase;
       +
                        asprintf(&path, "%s/%s", wwwbase, wwwindex);
                        ctype = "text/html";
                }