comparison ngx_http_upstream_keepalive_module.c @ 14:28af4b0b32c1

Keepalive: experimental fastcgi support. Works only with patched nginx and must be explicitly activated by define (./configure --with-cc-opt="-D NGX_UPSTREAM_KEEPALIVE_PATCHED").
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 15 Apr 2009 19:22:11 +0400
parents 15530a464dba
children 2054159546d0
comparison
equal deleted inserted replaced
13:181a487581b7 14:28af4b0b32c1
311 u = kp->upstream; 311 u = kp->upstream;
312 status = u->headers_in.status_n; 312 status = u->headers_in.status_n;
313 313
314 if (!kp->failed 314 if (!kp->failed
315 && pc->connection != NULL 315 && pc->connection != NULL
316 #if (NGX_UPSTREAM_KEEPALIVE_PATCHED)
317 && u->keepalive)
318 #else
316 && (status == NGX_HTTP_NOT_FOUND 319 && (status == NGX_HTTP_NOT_FOUND
317 || (status == NGX_HTTP_OK && u->header_sent && u->length == 0))) 320 || (status == NGX_HTTP_OK && u->header_sent && u->length == 0)))
321 #endif
318 { 322 {
319 c = pc->connection; 323 c = pc->connection;
320 324
321 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, 325 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
322 "free keepalive peer: saving connection %p", c); 326 "free keepalive peer: saving connection %p", c);