diff options
Diffstat (limited to 'src/tipideed')
-rw-r--r-- | src/tipideed/tipideed-internal.h | 4 | ||||
-rw-r--r-- | src/tipideed/tipideed.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/tipideed/tipideed-internal.h b/src/tipideed/tipideed-internal.h index 1efe291..8b0e114 100644 --- a/src/tipideed/tipideed-internal.h +++ b/src/tipideed/tipideed-internal.h @@ -40,6 +40,7 @@ struct global_s uint16_t indexn : 4 ; uint16_t cont : 2 ; uint16_t ssl : 1 ; + uint16_t xiscgi : 1 ; } ; #define GLOBAL_ZERO \ { \ @@ -62,7 +63,8 @@ struct global_s .defaultport = 0, \ .indexn = 0, \ .cont = 1, \ - .ssl = 0 \ + .ssl = 0, \ + .xiscgi = 0 \ } extern struct global_s g ; diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c index 56ef46c..1c07cf3 100644 --- a/src/tipideed/tipideed.c +++ b/src/tipideed/tipideed.c @@ -277,6 +277,7 @@ static inline int serve (tipidee_rql *rql, char const *docroot, char *uribuf, ti } tipidee_log_debug(g.logv, "serve: docroot ", docroot, " file ", fn, " infopath ", infopath ? infopath : "(none)") ; + if (g.xiscgi && st.st_mode & S_IXOTH) ra.flags |= TIPIDEE_RA_FLAG_CGI ; get_resattr(rql, docroot, fn, &ra) ; if (!ra.flags & TIPIDEE_RA_FLAG_CGI) @@ -351,6 +352,7 @@ int main (int argc, char const *const *argv, char const *const *envp) g.maxrqbody = get_uint32("G:max_request_body_length") ; g.maxcgibody = get_uint32("G:max_cgi_body_length") ; g.logv = get_uint32("G:logv") ; + g.xiscgi = !!get_uint32("G:executable_means_cgi") ; n = tipidee_conf_get_argv(&g.conf, "G:index-file", g.indexnames, 16, &g.indexlen) ; if (!n) strerr_dief3x(102, "bad", " config value for ", "G:index_file") ; g.indexn = n-1 ; |