You can plan NGINX. Take FastCGIfor example add
if (strcmp((char *)h->key.data, "Connection") == 0 && strcmp((char *)h->value.data, "close") == 0) {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "Set Connection: close");
r->keepalive = 0;
}
in line src/http/modules/ngx_http_fastcgi_module.c1977, immediately after the header analyzer.
source
share