ref: 07e15d84028510d623550c4bc880d1189b80030d
parent: 02612ca30c54df798f7c8cab214ba8a8323656dc
author: grobe0ba <grobe0ba@tcp80.org>
date: Sat Aug 6 01:26:46 EDT 2022
fix no-trailing-slash redirect in multi-site mode
--- a/tcp80.c
+++ b/tcp80.c
@@ -575,7 +575,7 @@
h = findhdr(nil, "Host");
p = strchr(location, '?');
- s = fullurl(h ? h->val : nil, urlenc(tmp, buf, sizeof(tmp)), "/",
+ s = fullurl(nil, urlenc(tmp, buf, sizeof(tmp)), "/",
p ? p + 1 : nil);
if(!nobody)
n = snprint(buf, sizeof(buf),