summaryrefslogtreecommitdiff
path: root/src/tipideed/cgi.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-30 09:38:18 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-30 09:38:18 +0000
commit00774b3f92bd6898ce56f41ce39074e9fe89c08e (patch)
treedeeb2a9b483ed3e4e637fc0ea744c65cc64d1763 /src/tipideed/cgi.c
parentf1a6903f46c0e2edcdd2b7fa83c8a5bb4ca0e021 (diff)
downloadtipidee-00774b3f92bd6898ce56f41ce39074e9fe89c08e.tar.xz
Some fixes; new SERVER_NAME source; prepare for more config
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/tipideed/cgi.c')
-rw-r--r--src/tipideed/cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tipideed/cgi.c b/src/tipideed/cgi.c
index dc813c8..a875acd 100644
--- a/src/tipideed/cgi.c
+++ b/src/tipideed/cgi.c
@@ -65,6 +65,7 @@ static inline void modify_env (tipidee_rql const *rql, tipidee_headers const *hd
if (rql->uri.query) addenv(rql, "QUERY_STRING", rql->uri.query) ;
else delenv(rql, "QUERY_STRING") ;
addenv(rql, "SCRIPT_NAME", script) ;
+ addenv(rql, "SERVER_NAME", rql->uri.host) ;
for (size_t i = 0 ; i < hdr->n ; i++)
{
@@ -83,7 +84,7 @@ static inline void modify_env (tipidee_rql const *rql, tipidee_headers const *hd
}
}
else if (!strcasecmp(key, "Content-Type")) { addenv(rql, "CONTENT_TYPE", val) ; got |= 2 ; }
- else if (!strcasecmp(key, "Content-Length") || !strcasecmp(key, "Connection")) ;
+ else if (!strcasecmp(key, "Content-Length") || !strcasecmp(key, "Connection") || !strcasecmp(key, "Host")) ;
else
{
size_t len = strlen(key), pos = g.sa.len + 5 ;