summaryrefslogtreecommitdiff
path: root/src/tipideed/cgi.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-10-06 00:13:28 +0000
committerLaurent Bercot <ska@appnovation.com>2023-10-06 00:13:28 +0000
commitd9f5cb7a28ee79e299e41d3ce325171f01e1a3d7 (patch)
treec13af66675cbd2ed3de340ab139297e4dcdbd199 /src/tipideed/cgi.c
parent8d66c8c5cac310958fa64e3f62b828ea960202ba (diff)
downloadtipidee-d9f5cb7a28ee79e299e41d3ce325171f01e1a3d7.tar.xz
Some fixes, preparation for changes in error responses
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/tipideed/cgi.c')
-rw-r--r--src/tipideed/cgi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tipideed/cgi.c b/src/tipideed/cgi.c
index a875acd..9cd395d 100644
--- a/src/tipideed/cgi.c
+++ b/src/tipideed/cgi.c
@@ -66,6 +66,11 @@ static inline void modify_env (tipidee_rql const *rql, tipidee_headers const *hd
else delenv(rql, "QUERY_STRING") ;
addenv(rql, "SCRIPT_NAME", script) ;
addenv(rql, "SERVER_NAME", rql->uri.host) ;
+ {
+ char proto[9] = "HTTP/1.1" ;
+ if (!rql->http_minor) proto[7] = '0' ;
+ addenv(rql, "SERVER_PROTOCOL", proto) ;
+ }
for (size_t i = 0 ; i < hdr->n ; i++)
{