Skip to content

Commit

Permalink
FastCGI module requires chunked encoding
Browse files Browse the repository at this point in the history
So error out if the request is HTTP/1.0.
  • Loading branch information
lpereira committed Apr 29, 2024
1 parent ce4161c commit d56d588
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/lwan-mod-fastcgi.c
Expand Up @@ -423,6 +423,13 @@ static void reset_additional_header(void *data)
static enum lwan_http_status
try_initiating_chunked_response(struct lwan_request *request)
{
if (request->flags & REQUEST_IS_HTTP_1_0) {
/* Chunked encoding is not supported in HTTP/1.0. We don't have a
* way to buffer the responses in this module yet, so return an
* error here. */
return HTTP_NOT_IMPLEMENTED;
}

struct lwan_response *response = &request->response;
char *header_start[N_HEADER_START];
char *next_request;
Expand Down

0 comments on commit d56d588

Please sign in to comment.