comparison src/http/modules/perl/ngx_http_perl_module.c @ 7531:ede052c67512

Perl: additional ctx->header_sent checks. As we now have ctx->header_sent flag, it is further used to prevent duplicate $r->send_http_header() calls, prevent output before sending header, and $r->internal_redirect() after sending header. Further, $r->send_http_header() protected from calls after $r->internal_redirect().
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 12 Jul 2019 15:39:25 +0300
parents fd9252844ec1
children 975d7ab37b39
comparison
equal deleted inserted replaced
7530:fd9252844ec1 7531:ede052c67512
392 } 392 }
393 393
394 pmcf = ngx_http_get_module_main_conf(r, ngx_http_perl_module); 394 pmcf = ngx_http_get_module_main_conf(r, ngx_http_perl_module);
395 395
396 ctx->ssi = ssi_ctx; 396 ctx->ssi = ssi_ctx;
397 ctx->header_sent = 1;
397 398
398 handler = params[NGX_HTTP_PERL_SSI_SUB]; 399 handler = params[NGX_HTTP_PERL_SSI_SUB];
399 handler->data[handler->len] = '\0'; 400 handler->data[handler->len] = '\0';
400 401
401 { 402 {