Mercurial > hg > nginx-vendor-0-8
comparison src/http/ngx_http_request.c @ 502:f0cac61857ae NGINX_0_8_3
nginx 0.8.3
*) Feature: the $upstream_cache_status variable.
*) Bugfix: nginx could not be built on MacOSX 10.6. the bug had
appeared in 0.8.2.
*) Bugfix: nginx could not be built --without-http-cache; the bug had
appeared in 0.8.2.
*) Bugfix: a segmentation fault occurred in worker process, if a
backend 401 error was intercepted and the backend did not set the
"WWW-Authenticate" response header line.
Thanks to Eugene Mychlo.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 19 Jun 2009 00:00:00 +0400 |
parents | f39b9e29530d |
children | e8b686f230a8 |
comparison
equal
deleted
inserted
replaced
501:531b6bbae529 | 502:f0cac61857ae |
---|---|
196 rev = c->read; | 196 rev = c->read; |
197 rev->handler = ngx_http_init_request; | 197 rev->handler = ngx_http_init_request; |
198 c->write->handler = ngx_http_empty_handler; | 198 c->write->handler = ngx_http_empty_handler; |
199 | 199 |
200 #if (NGX_STAT_STUB) | 200 #if (NGX_STAT_STUB) |
201 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 201 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
202 #endif | 202 #endif |
203 | 203 |
204 if (rev->ready) { | 204 if (rev->ready) { |
205 /* the deferred accept(), rtsig, aio, iocp */ | 205 /* the deferred accept(), rtsig, aio, iocp */ |
206 | 206 |
215 | 215 |
216 ngx_add_timer(rev, c->listening->post_accept_timeout); | 216 ngx_add_timer(rev, c->listening->post_accept_timeout); |
217 | 217 |
218 if (ngx_handle_read_event(rev, 0) != NGX_OK) { | 218 if (ngx_handle_read_event(rev, 0) != NGX_OK) { |
219 #if (NGX_STAT_STUB) | 219 #if (NGX_STAT_STUB) |
220 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 220 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
221 #endif | 221 #endif |
222 ngx_http_close_connection(c); | 222 ngx_http_close_connection(c); |
223 return; | 223 return; |
224 } | 224 } |
225 } | 225 } |
245 struct sockaddr_in6 *sin6; | 245 struct sockaddr_in6 *sin6; |
246 ngx_http_in6_addr_t *addr6; | 246 ngx_http_in6_addr_t *addr6; |
247 #endif | 247 #endif |
248 | 248 |
249 #if (NGX_STAT_STUB) | 249 #if (NGX_STAT_STUB) |
250 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 250 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
251 #endif | 251 #endif |
252 | 252 |
253 c = rev->data; | 253 c = rev->data; |
254 | 254 |
255 if (rev->timedout) { | 255 if (rev->timedout) { |
498 ctx->request = r; | 498 ctx->request = r; |
499 ctx->current_request = r; | 499 ctx->current_request = r; |
500 r->log_handler = ngx_http_log_error_handler; | 500 r->log_handler = ngx_http_log_error_handler; |
501 | 501 |
502 #if (NGX_STAT_STUB) | 502 #if (NGX_STAT_STUB) |
503 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 503 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
504 r->stat_reading = 1; | 504 r->stat_reading = 1; |
505 ngx_atomic_fetch_add(ngx_stat_requests, 1); | 505 (void) ngx_atomic_fetch_add(ngx_stat_requests, 1); |
506 #endif | 506 #endif |
507 | 507 |
508 rev->handler(rev); | 508 rev->handler(rev); |
509 } | 509 } |
510 | 510 |
1545 if (c->read->timer_set) { | 1545 if (c->read->timer_set) { |
1546 ngx_del_timer(c->read); | 1546 ngx_del_timer(c->read); |
1547 } | 1547 } |
1548 | 1548 |
1549 #if (NGX_STAT_STUB) | 1549 #if (NGX_STAT_STUB) |
1550 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 1550 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
1551 r->stat_reading = 0; | 1551 r->stat_reading = 0; |
1552 ngx_atomic_fetch_add(ngx_stat_writing, 1); | 1552 (void) ngx_atomic_fetch_add(ngx_stat_writing, 1); |
1553 r->stat_writing = 1; | 1553 r->stat_writing = 1; |
1554 #endif | 1554 #endif |
1555 | 1555 |
1556 c->read->handler = ngx_http_request_handler; | 1556 c->read->handler = ngx_http_request_handler; |
1557 c->write->handler = ngx_http_request_handler; | 1557 c->write->handler = ngx_http_request_handler; |
2317 if (b->pos < b->last) { | 2317 if (b->pos < b->last) { |
2318 | 2318 |
2319 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request"); | 2319 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request"); |
2320 | 2320 |
2321 #if (NGX_STAT_STUB) | 2321 #if (NGX_STAT_STUB) |
2322 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 2322 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
2323 #endif | 2323 #endif |
2324 | 2324 |
2325 hc->pipeline = 1; | 2325 hc->pipeline = 1; |
2326 c->log->action = "reading client pipelined request line"; | 2326 c->log->action = "reading client pipelined request line"; |
2327 | 2327 |
2547 } | 2547 } |
2548 | 2548 |
2549 b->last += n; | 2549 b->last += n; |
2550 | 2550 |
2551 #if (NGX_STAT_STUB) | 2551 #if (NGX_STAT_STUB) |
2552 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 2552 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
2553 #endif | 2553 #endif |
2554 | 2554 |
2555 c->log->handler = ngx_http_log_error; | 2555 c->log->handler = ngx_http_log_error; |
2556 c->log->action = "reading client request line"; | 2556 c->log->action = "reading client request line"; |
2557 | 2557 |
2776 } | 2776 } |
2777 | 2777 |
2778 #if (NGX_STAT_STUB) | 2778 #if (NGX_STAT_STUB) |
2779 | 2779 |
2780 if (r->stat_reading) { | 2780 if (r->stat_reading) { |
2781 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 2781 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
2782 } | 2782 } |
2783 | 2783 |
2784 if (r->stat_writing) { | 2784 if (r->stat_writing) { |
2785 ngx_atomic_fetch_add(ngx_stat_writing, -1); | 2785 (void) ngx_atomic_fetch_add(ngx_stat_writing, -1); |
2786 } | 2786 } |
2787 | 2787 |
2788 #endif | 2788 #endif |
2789 | 2789 |
2790 if (error && r->headers_out.status == 0) { | 2790 if (error && r->headers_out.status == 0) { |
2861 } | 2861 } |
2862 | 2862 |
2863 #endif | 2863 #endif |
2864 | 2864 |
2865 #if (NGX_STAT_STUB) | 2865 #if (NGX_STAT_STUB) |
2866 ngx_atomic_fetch_add(ngx_stat_active, -1); | 2866 (void) ngx_atomic_fetch_add(ngx_stat_active, -1); |
2867 #endif | 2867 #endif |
2868 | 2868 |
2869 c->destroyed = 1; | 2869 c->destroyed = 1; |
2870 | 2870 |
2871 pool = c->pool; | 2871 pool = c->pool; |