aboutsummaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-03-22 05:53:08 +0000
committerLaurent Bercot <ska@appnovation.com>2025-03-22 05:53:08 +0000
commit9cd4e0d1902ebb196ebd53ed7ee88e6689d801b7 (patch)
treeab44d569dce124541085629f6dbe0cc27b1da0fa /src/config
parent53fdbac9da06a0dfb3f2821f7c7384001eea4f68 (diff)
downloadtipidee-9cd4e0d1902ebb196ebd53ed7ee88e6689d801b7.tar.gz
Add cgi streaming
WILDLY UNTESTED, don't use this commit, probably. Also, autochunk hasn't been implemented yet. Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/headers.c1
-rw-r--r--src/config/lexparse.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/config/headers.c b/src/config/headers.c
index efeb712..2a34bba 100644
--- a/src/config/headers.c
+++ b/src/config/headers.c
@@ -30,6 +30,7 @@ static struct builtinheaders_s const builtinheaders[] =
{ .key = "Date", .value = 0, .overridable = 0 },
{ .key = "Server", .value = "tipidee/" TIPIDEE_VERSION, .overridable = 1 },
{ .key = "Status", .value = 0, .overridable = 0 },
+ { .key = "Transfer-Encoding", .value = 0, .overridable = 0 },
{ .key = "Vary", .value = "Accept-Encoding", .overridable = 0 },
{ .key = "X-Content-Type-Options", .value = "nosniff", .overridable = 1 },
{ .key = "X-Frame-Options", .value = "DENY", .overridable = 1 }
diff --git a/src/config/lexparse.c b/src/config/lexparse.c
index a799a6b..160aa97 100644
--- a/src/config/lexparse.c
+++ b/src/config/lexparse.c
@@ -50,6 +50,8 @@ enum directivevalue_e
T_NONNPH,
T_BASICAUTH,
T_NOAUTH,
+ T_AUTOCHUNK,
+ T_NOAUTOCHUNK,
T_FILETYPE,
T_CUSTOMRESPONSE
} ;
@@ -408,6 +410,7 @@ static inline void process_line (char const *s, size_t const *word, size_t n, st
static struct namevalue_s const directives[] =
{
{ .name = "!", .value = T_BANG },
+ { .name = "autochunk", .value = T_AUTOCHUNK },
{ .name = "basic-auth", .value = T_BASICAUTH },
{ .name = "cgi", .value = T_CGI },
{ .name = "content-type", .value = T_CONTENTTYPE },
@@ -419,6 +422,7 @@ static inline void process_line (char const *s, size_t const *word, size_t n, st
{ .name = "index-file", .value = T_INDEXFILE },
{ .name = "log", .value = T_LOG },
{ .name = "no-auth", .value = T_NOAUTH },
+ { .name = "noautochunk", .value = T_NOAUTOCHUNK },
{ .name = "noncgi", .value = T_NONCGI },
{ .name = "nonnph", .value = T_NONNPH },
{ .name = "nph", .value = T_NPH },
@@ -508,6 +512,12 @@ static inline void process_line (char const *s, size_t const *word, size_t n, st
strerr_warnw5x("file ", g.storage.s + md->filepos, " line ", md->linefmt, ": directive basic-auth not implemented in tipidee-" TIPIDEE_VERSION) ;
parse_bitattr(s, word, n, domain->s, domain->len, md, 2, 0) ;
break ;
+ case T_AUTOCHUNK :
+ parse_bitattr(s, word, n, domain->s, domain->len, md, 3, 1) ;
+ break ;
+ case T_NOAUTOCHUNK :
+ parse_bitattr(s, word, n, domain->s, domain->len, md, 3, 0) ;
+ break ;
case T_FILETYPE :
parse_filetype(s, word, n, domain->s, domain->len, md) ;
break ;