Skip to content

Commit d56d588

Browse files
committed
FastCGI module requires chunked encoding
So error out if the request is HTTP/1.0.
1 parent ce4161c commit d56d588

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib/lwan-mod-fastcgi.c

+7
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,13 @@ static void reset_additional_header(void *data)
423423
static enum lwan_http_status
424424
try_initiating_chunked_response(struct lwan_request *request)
425425
{
426+
if (request->flags & REQUEST_IS_HTTP_1_0) {
427+
/* Chunked encoding is not supported in HTTP/1.0. We don't have a
428+
* way to buffer the responses in this module yet, so return an
429+
* error here. */
430+
return HTTP_NOT_IMPLEMENTED;
431+
}
432+
426433
struct lwan_response *response = &request->response;
427434
char *header_start[N_HEADER_START];
428435
char *next_request;

0 commit comments

Comments
 (0)