[mod_fastcgi,mod_scgi] error on oversized request (fixes #2905)

regression in lighttpd 1.4.49 and lighttpd 1.4.50

(thx slawomir.pryczek)

x-ref
  "oversized fcgi requests should fail gracefully"
  https://redmine.lighttpd.net/issues/2905
This commit is contained in:
Glenn Strauss 2018-09-16 03:11:56 -04:00
parent a458c2e731
commit 4992c4de10
2 changed files with 2 additions and 0 deletions

View File

@ -243,6 +243,7 @@ static handler_t fcgi_create_env(server *srv, handler_ctx *hctx) {
if (0 != http_cgi_headers(srv, con, &opts, fcgi_env_add, fcgi_env)) {
con->http_status = 400;
con->mode = DIRECT;
buffer_free(fcgi_env);
return HANDLER_FINISHED;
} else {

View File

@ -160,6 +160,7 @@ static handler_t scgi_create_env(server *srv, handler_ctx *hctx) {
if (0 != http_cgi_headers(srv, con, &opts, scgi_env_add, scgi_env)) {
buffer_free(scgi_env);
con->http_status = 400;
con->mode = DIRECT;
return HANDLER_FINISHED;
}