August 26, 2016 11:15PM
if (r->keepalive) {
if (clcf->keepalive_timeout == 0) {
r->keepalive = 0;

} else if (r->connection->requests >= clcf->keepalive_requests) {
r->keepalive = 0;

} else if (r->headers_in.msie6
&& r->method == NGX_HTTP_POST
&& (clcf->keepalive_disable
& NGX_HTTP_KEEPALIVE_DISABLE_MSIE6))
{
/*
* MSIE may wait for some time if an response for
* a POST request was sent over a keepalive connection
*/
r->keepalive = 0;

} else if (r->headers_in.safari
&& (clcf->keepalive_disable
& NGX_HTTP_KEEPALIVE_DISABLE_SAFARI))
{
/*
* Safari may send a POST request to a closed keepalive
* connection and may stall for some time, see
* https://bugs.webkit.org/show_bug.cgi?id=5760
*/
r->keepalive = 0;
}
}

Note r->keepalive only effect that Connection filed in response header and set keepalive timer when finalize request
Why place this code block in ngx_http_update_location_config? Would be better place it when set keepalive timer?
And maybe ngx send "Connection: keep-alive", but close connection in present 1.10.1, and this would be nothing seriously
So why is it the expected behaviour?
Subject Author Posted

internal location keepalive_requests issue

crasyangel August 26, 2016 02:50PM

Re: internal location keepalive_requests issue

Maxim Dounin August 26, 2016 04:12PM

Re: internal location keepalive_requests issue

crasyangel August 26, 2016 11:15PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready