summaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-12-15 11:30:58 +0000
committerJonathan Kolb <jon@b0g.us>2008-12-15 11:30:58 +0000
commitaccf374de9a9b1fdc8df617172bb7e7eed62c83c (patch)
treee570222469fa41eac7977de79c9deb141cc444be /src/http/ngx_http_request.c
parent37eb9af78547c075879b3c3bc5e85b9b584fe324 (diff)
downloadnginx-accf374de9a9b1fdc8df617172bb7e7eed62c83c.tar.gz
Changes with nginx 0.7.27 15 Dec 2008v0.7.27
*) Feature: the "try_files" directive. *) Feature: variables support in the "fastcgi_pass" directive. *) Feature: now the $geo variable may get an address from a variable. Thanks to Andrei Nigmatulin. *) Feature: now a location's modifier may be used without space before name. *) Feature: the $upstream_response_length variable. *) Bugfix: now a "add_header" directive does not add an empty value. *) Bugfix: if zero length static file was requested, then nginx just closed connection; the bug had appeared in 0.7.25. *) Bugfix: a MOVE method could not move file in non-existent directory. *) Bugfix: a segmentation fault occurred in worker process, if no one named location was defined in server, but some one was used in an error_page directive. Thanks to Sergey Bochenkov.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 2faa79195..1a774e434 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -215,7 +215,7 @@ ngx_http_init_connection(ngx_connection_t *c)
ngx_add_timer(rev, c->listening->post_accept_timeout);
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
#if (NGX_STAT_STUB)
ngx_atomic_fetch_add(ngx_stat_reading, -1);
#endif
@@ -504,7 +504,7 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
ngx_add_timer(rev, c->listening->post_accept_timeout);
}
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
}
@@ -1038,7 +1038,7 @@ ngx_http_read_request_header(ngx_http_request_t *r)
ngx_add_timer(rev, cscf->client_header_timeout);
}
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return NGX_ERROR;
}
@@ -1883,8 +1883,6 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
"http wake parent request: \"%V?%V\"",
&pr->uri, &pr->args);
- ngx_http_run_posted_requests(c);
-
return;
}
@@ -1973,7 +1971,7 @@ ngx_http_set_write_handler(ngx_http_request_t *r)
ngx_add_timer(wev, clcf->send_timeout);
}
- if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
+ if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
ngx_http_close_request(r, 0);
return NGX_ERROR;
}
@@ -2014,7 +2012,7 @@ ngx_http_writer(ngx_http_request_t *r)
if (!wev->ready) {
ngx_add_timer(wev, clcf->send_timeout);
- if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
+ if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
ngx_http_close_request(r, 0);
}
@@ -2026,7 +2024,7 @@ ngx_http_writer(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0,
"http writer delayed");
- if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
+ if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
ngx_http_close_request(r, 0);
}
@@ -2050,7 +2048,7 @@ ngx_http_writer(ngx_http_request_t *r)
ngx_add_timer(wev, clcf->send_timeout);
}
- if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
+ if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
ngx_http_close_request(r, 0);
}
@@ -2085,9 +2083,7 @@ ngx_http_block_reading(ngx_http_request_t *r)
if ((ngx_event_flags & NGX_USE_LEVEL_EVENT)
&& r->connection->read->active)
{
- if (ngx_del_event(r->connection->read, NGX_READ_EVENT, 0)
- == NGX_ERROR)
- {
+ if (ngx_del_event(r->connection->read, NGX_READ_EVENT, 0) != NGX_OK) {
ngx_http_close_request(r, 0);
}
}
@@ -2149,7 +2145,7 @@ ngx_http_test_reading(ngx_http_request_t *r)
if ((ngx_event_flags & NGX_USE_LEVEL_EVENT) && rev->active) {
- if (ngx_del_event(rev, NGX_READ_EVENT, 0) == NGX_ERROR) {
+ if (ngx_del_event(rev, NGX_READ_EVENT, 0) != NGX_OK) {
ngx_http_close_request(r, 0);
}
}
@@ -2243,7 +2239,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
ngx_add_timer(rev, clcf->keepalive_timeout);
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_connection(c);
return;
}
@@ -2330,7 +2326,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
rev->handler = ngx_http_keepalive_handler;
if (wev->active && (ngx_event_flags & NGX_USE_LEVEL_EVENT)) {
- if (ngx_del_event(wev, NGX_WRITE_EVENT, 0) == NGX_ERROR) {
+ if (ngx_del_event(wev, NGX_WRITE_EVENT, 0) != NGX_OK) {
ngx_http_close_connection(c);
return;
}
@@ -2455,7 +2451,7 @@ ngx_http_keepalive_handler(ngx_event_t *rev)
c->log_error = NGX_ERROR_INFO;
if (n == NGX_AGAIN) {
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_connection(c);
}
@@ -2508,7 +2504,7 @@ ngx_http_set_lingering_close(ngx_http_request_t *r)
r->lingering_time = ngx_time() + (time_t) (clcf->lingering_time / 1000);
ngx_add_timer(rev, clcf->lingering_timeout);
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_request(r, 0);
return;
}
@@ -2517,7 +2513,7 @@ ngx_http_set_lingering_close(ngx_http_request_t *r)
wev->handler = ngx_http_empty_handler;
if (wev->active && (ngx_event_flags & NGX_USE_LEVEL_EVENT)) {
- if (ngx_del_event(wev, NGX_WRITE_EVENT, 0) == NGX_ERROR) {
+ if (ngx_del_event(wev, NGX_WRITE_EVENT, 0) != NGX_OK) {
ngx_http_close_request(r, 0);
return;
}
@@ -2576,7 +2572,7 @@ ngx_http_lingering_close_handler(ngx_event_t *rev)
} while (rev->ready);
- if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_request(r, 0);
return;
}