Introduction
Introduction Statistics Contact Development Disclaimer Help
Add zuccless support. - bitreich-httpd - Bitreich HTTPD service
git clone git://bitreich.org/bitreich-httpd git://enlrupgkhuxnvlhsf6lc3fziv5h2h…
Log
Files
Refs
Tags
README
LICENSE
---
commit 0f24889dc4f0b3982034d9c4ff58e73f8abe3e16
parent 24b9dc39989a25a24c9c612490da39f05303e633
Author: Christoph Lohmann <[email protected]>
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(-)
---
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(clien…
@@ -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";
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.