comparison src/http/ngx_http_request.c @ 136:3656228c0b56 NGINX_0_3_15

nginx 0.3.15 *) Feature: the new 444 code of the "return" directive to close connection. *) Feature: the "so_keepalive" directive in IMAP/POP3 proxy. *) Bugfix: if there are unclosed connection nginx now calls abort() only on gracefull quit and active "debug_points" directive.
author Igor Sysoev <http://sysoev.ru>
date Wed, 07 Dec 2005 00:00:00 +0300
parents 91372f004adf
children 8e6d4d96ec4c
comparison
equal deleted inserted replaced
135:c1ac76c0e9df 136:3656228c0b56
1458 return; 1458 return;
1459 } 1459 }
1460 1460
1461 if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_HTTP_NO_CONTENT) { 1461 if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_HTTP_NO_CONTENT) {
1462 1462
1463 if (rc == NGX_HTTP_CLOSE) {
1464 ngx_http_close_request(r, rc);
1465 return;
1466 }
1467
1463 if (r->main == r) { 1468 if (r->main == r) {
1464 if (r->connection->read->timer_set) { 1469 if (r->connection->read->timer_set) {
1465 ngx_del_timer(r->connection->read); 1470 ngx_del_timer(r->connection->read);
1466 } 1471 }
1467 1472
1554 if (r->connection->write->timer_set) { 1559 if (r->connection->write->timer_set) {
1555 r->connection->write->delayed = 0; 1560 r->connection->write->delayed = 0;
1556 ngx_del_timer(r->connection->write); 1561 ngx_del_timer(r->connection->write);
1557 } 1562 }
1558 1563
1564 #if 0
1559 if (r->connection->read->pending_eof) { 1565 if (r->connection->read->pending_eof) {
1560 #if (NGX_HAVE_KQUEUE) 1566 #if (NGX_HAVE_KQUEUE)
1561 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 1567 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log,
1562 r->connection->read->kq_errno, 1568 r->connection->read->kq_errno,
1563 "kevent() reported about an closed connection"); 1569 "kevent() reported about an closed connection");
1564 #endif 1570 #endif
1565 ngx_http_close_request(r, 0); 1571 ngx_http_close_request(r, 0);
1566 return; 1572 return;
1567 } 1573 }
1574 #endif
1568 1575
1569 if (!ngx_terminate 1576 if (!ngx_terminate
1570 && !ngx_exiting 1577 && !ngx_exiting
1571 && r->keepalive != 0 1578 && r->keepalive != 0
1572 && clcf->keepalive_timeout > 0) 1579 && clcf->keepalive_timeout > 0)
2044 } 2051 }
2045 2052
2046 #if (NGX_HAVE_KQUEUE) 2053 #if (NGX_HAVE_KQUEUE)
2047 2054
2048 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { 2055 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
2049 if (rev->pending_eof 2056 if (rev->pending_eof) {
2050 /* FreeBSD 5.x-6.x may erroneously report ETIMEDOUT */
2051 && rev->kq_errno != NGX_ETIMEDOUT)
2052 {
2053 c->log->handler = NULL; 2057 c->log->handler = NULL;
2054 ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno, 2058 ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno,
2055 "kevent() reported that client %V closed " 2059 "kevent() reported that client %V closed "
2056 "keepalive connection", &c->addr_text); 2060 "keepalive connection", &c->addr_text);
2057 #if (NGX_HTTP_SSL) 2061 #if (NGX_HTTP_SSL)