aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-12-07 14:51:31 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-12-07 14:51:31 +0000
commitcdc463042b9406e4703d21202bc363e86321bb5d (patch)
tree1f6d050377dafbf42bb3d7c8c7e15e86939500ff /src/http/ngx_http_request.c
parentc20f0c28ff5478dcafd2ce2e5056da3757eb62ff (diff)
downloadnginx-cdc463042b9406e4703d21202bc363e86321bb5d.tar.gz
nginx-cdc463042b9406e4703d21202bc363e86321bb5d.zip
nginx-0.3.15-RELEASE importrelease-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.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 569f62e1d..c6d6d6fc2 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1460,6 +1460,11 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_HTTP_NO_CONTENT) {
+ if (rc == NGX_HTTP_CLOSE) {
+ ngx_http_close_request(r, rc);
+ return;
+ }
+
if (r->main == r) {
if (r->connection->read->timer_set) {
ngx_del_timer(r->connection->read);
@@ -1556,6 +1561,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
ngx_del_timer(r->connection->write);
}
+#if 0
if (r->connection->read->pending_eof) {
#if (NGX_HAVE_KQUEUE)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log,
@@ -1565,6 +1571,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
ngx_http_close_request(r, 0);
return;
}
+#endif
if (!ngx_terminate
&& !ngx_exiting
@@ -2046,10 +2053,7 @@ ngx_http_keepalive_handler(ngx_event_t *rev)
#if (NGX_HAVE_KQUEUE)
if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
- if (rev->pending_eof
- /* FreeBSD 5.x-6.x may erroneously report ETIMEDOUT */
- && rev->kq_errno != NGX_ETIMEDOUT)
- {
+ if (rev->pending_eof) {
c->log->handler = NULL;
ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno,
"kevent() reported that client %V closed "