aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config/lexparse.c1
-rw-r--r--src/tipideed/cgi.c1
-rw-r--r--src/tipideed/tipideed-internal.h4
-rw-r--r--src/tipideed/tipideed.c1
4 files changed, 6 insertions, 1 deletions
diff --git a/src/config/lexparse.c b/src/config/lexparse.c
index dd74e65..9bceb8e 100644
--- a/src/config/lexparse.c
+++ b/src/config/lexparse.c
@@ -116,6 +116,7 @@ static inline void parse_global (char const *s, size_t const *word, size_t n, md
static char const *const globalkeys[] =
{
"XXX_no_translate",
+ "cgi_pass_authorization",
"cgi_timeout",
"executable_means_cgi",
"max_cgi_body_length",
diff --git a/src/tipideed/cgi.c b/src/tipideed/cgi.c
index 3e15b69..ca66ec5 100644
--- a/src/tipideed/cgi.c
+++ b/src/tipideed/cgi.c
@@ -97,6 +97,7 @@ static inline void modify_env (tipidee_rql const *rql, char const *docroot, tipi
addenvb(rql, docroot, "AUTH_TYPE", val, n) ;
got |= 1 ;
}
+ if (g.flagcgipassauth) addenvb(rql, docroot, "HTTP_AUTHORIZATION", val, len) ;
}
else if (!strcasecmp(key, "Content-Type")) { addenv(rql, docroot, "CONTENT_TYPE", val) ; got |= 2 ; }
else if (!strcasecmp(key, "Content-Length") || !strcasecmp(key, "Connection")) ;
diff --git a/src/tipideed/tipideed-internal.h b/src/tipideed/tipideed-internal.h
index 2cc8186..5d72cd6 100644
--- a/src/tipideed/tipideed-internal.h
+++ b/src/tipideed/tipideed-internal.h
@@ -43,6 +43,7 @@ struct global_s
uint16_t ssl : 1 ;
uint16_t xiscgi : 1 ;
uint8_t flagnoxlate : 1 ;
+ uint8_t flagcgipassauth : 1 ;
} ;
#define GLOBAL_ZERO \
{ \
@@ -68,7 +69,8 @@ struct global_s
.cont = 1, \
.ssl = 0, \
.xiscgi = 0, \
- .flagnoxlate = 0 \
+ .flagnoxlate = 0, \
+ .flagcgipassauth = 0 \
}
extern struct global_s g ;
diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c
index 402c59c..4bd3242 100644
--- a/src/tipideed/tipideed.c
+++ b/src/tipideed/tipideed.c
@@ -386,6 +386,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
g.logv = get_uint32("G:logv") ;
g.xiscgi = !!get_uint32("G:executable_means_cgi") ;
g.flagnoxlate = !!get_uint32("G:XXX_no_translate") ;
+ g.flagcgipassauth = !!get_uint32("G:cgi_pass_authorization") ;
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 ;