comparison src/http/modules/proxy/ngx_http_proxy_cache.c @ 189:c966c09be66b

nginx-0.0.1-2003-11-18-19:49:00 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 18 Nov 2003 16:49:00 +0000
parents c1f3a3c7c5db
children 02a715e85df1
comparison
equal deleted inserted replaced
188:0061d1f0908d 189:c966c09be66b
281 } 281 }
282 282
283 p->cache->ctx.file.info_valid = 1; 283 p->cache->ctx.file.info_valid = 1;
284 } 284 }
285 285
286
287 if (rc == NGX_AGAIN) { 286 if (rc == NGX_AGAIN) {
287
288 if ((ngx_event_flags & (NGX_USE_CLEAR_EVENT|NGX_HAVE_KQUEUE_EVENT))
289 && !p->request->connection->write->active)
290 {
291 /*
292 * kqueue allows to detect when client closes prematurely
293 * connection
294 */
295
296 p->request->connection->write->event_handler =
297 ngx_http_proxy_check_broken_connection;
298
299 if (ngx_add_event(p->request->connection->write, NGX_WRITE_EVENT,
300 NGX_CLEAR_EVENT) == NGX_ERROR)
301 {
302 ngx_http_proxy_finalize_request(p,
303 NGX_HTTP_INTERNAL_SERVER_ERROR);
304 return;
305 }
306 }
307
288 return; 308 return;
289 } 309 }
290 310
291 ngx_http_busy_unlock(p->lcf->busy_lock, &p->busy_lock); 311 ngx_http_busy_unlock(p->lcf->busy_lock, &p->busy_lock);
292 312