summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tipideed/responses.c2
-rw-r--r--src/tipideed/tipideed.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/tipideed/responses.c b/src/tipideed/responses.c
index 02109b3..0c93582 100644
--- a/src/tipideed/responses.c
+++ b/src/tipideed/responses.c
@@ -54,7 +54,7 @@ void respond_30x (tipidee_rql const *rql, tipidee_redirection const *rd)
tain deadline ;
tipidee_response_status_line(buffer_1, rql, rsl[rd->type]) ;
tipidee_response_header_common_put_g(buffer_1, 0) ;
- buffer_putsnoflush(buffer_1, "Location: ") ;
+ buffer_putsnoflush(buffer_1, "Content-Length: 0\r\nLocation: ") ;
buffer_putsnoflush(buffer_1, rd->location) ;
if (rd->sub) buffer_putsnoflush(buffer_1, rd->sub) ;
buffer_putnoflush(buffer_1, "\r\n\r\n", 4) ;
diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c
index e1021d3..118f33a 100644
--- a/src/tipideed/tipideed.c
+++ b/src/tipideed/tipideed.c
@@ -42,7 +42,7 @@ static void sigchld_handler (int sig)
static inline void prep_env (void)
{
- static char const basevars[] = "PROTO\0GATEWAY_INTERFACE=CGI/1.1\0SERVER_PROTOCOL=HTTP/1.1\0SERVER_SOFTWARE=tipidee/" TIPIDEE_VERSION ;
+ static char const basevars[] = "PROTO\0TCPCONNNUM\0GATEWAY_INTERFACE=CGI/1.1\0SERVER_PROTOCOL=HTTP/1.1\0SERVER_SOFTWARE=tipidee/" TIPIDEE_VERSION ;
static char const sslvars[] = "SSL_PROTOCOL\0SSL_CIPHER\0SSL_TLS_SNI_SERVERNAME\0SSL_PEER_CERT_HASH\0SSL_PEER_CERT_SUBJECT\0HTTPS=on" ;
char const *x = getenv("SSL_PROTOCOL") ;
if (!stralloc_readyplus(&g.sa, 320)) dienomem() ;
@@ -489,6 +489,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
else exit_400(&rql, "Request body does not match Content-Length") ;
}
bodysa.len = content_length ;
+ break ;
}
case TIPIDEE_TRANSFERCODING_CHUNKED :
{
@@ -498,6 +499,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
else if (errno == EMSGSIZE) exit_413(&rql, "Request body too large") ;
else exit_400(&rql, "Invalid chunked body") ;
}
+ break ;
}
default : break ;
}