Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http_upstream.c @ 372:6639b93e81b2 NGINX_0_6_30
nginx 0.6.30
*) Change: now if an "include" directive pattern does not match any
file, then nginx does not issue an error.
*) Feature: now the time in directives may be specified without spaces,
for example, "1h50m".
*) Bugfix: memory leaks if the "ssl_verify_client" directive was on.
Thanks to Chavelle Vincent.
*) Bugfix: the "sub_filter" directive might set text to change into
output.
*) Bugfix: the "error_page" directive did not take into account
arguments in redirected URI.
*) Bugfix: now nginx always opens files in binary mode under Cygwin.
*) Bugfix: nginx could not be built on OpenBSD; bug appeared in 0.6.15.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 29 Apr 2008 00:00:00 +0400 |
parents | 9a242235a80a |
children | 984bb0b1399b |
comparison
equal
deleted
inserted
replaced
371:b6a2a305fdad | 372:6639b93e81b2 |
---|---|
331 return; | 331 return; |
332 } | 332 } |
333 | 333 |
334 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 334 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
335 | 335 |
336 u->output.sendfile = c->sendfile; | |
337 u->output.pool = r->pool; | 336 u->output.pool = r->pool; |
338 u->output.bufs.num = 1; | 337 u->output.bufs.num = 1; |
339 u->output.bufs.size = clcf->client_body_buffer_size; | 338 u->output.bufs.size = clcf->client_body_buffer_size; |
340 u->output.output_filter = ngx_chain_writer; | 339 u->output.output_filter = ngx_chain_writer; |
341 u->output.filter_ctx = &u->writer; | 340 u->output.filter_ctx = &u->writer; |
420 ctx->type = NGX_RESOLVE_A; | 419 ctx->type = NGX_RESOLVE_A; |
421 ctx->handler = ngx_http_upstream_resolve_handler; | 420 ctx->handler = ngx_http_upstream_resolve_handler; |
422 ctx->data = r; | 421 ctx->data = r; |
423 ctx->timeout = clcf->resolver_timeout; | 422 ctx->timeout = clcf->resolver_timeout; |
424 | 423 |
424 u->resolved->ctx = ctx; | |
425 | |
425 if (ngx_resolve_name(ctx) != NGX_OK) { | 426 if (ngx_resolve_name(ctx) != NGX_OK) { |
427 u->resolved->ctx = NULL; | |
426 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 428 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
427 return; | 429 return; |
428 } | 430 } |
429 | |
430 u->resolved->ctx = ctx; | |
431 | 431 |
432 return; | 432 return; |
433 } | 433 } |
434 | 434 |
435 found: | 435 found: |
700 | 700 |
701 c->write->handler = ngx_http_upstream_send_request_handler; | 701 c->write->handler = ngx_http_upstream_send_request_handler; |
702 c->read->handler = ngx_http_upstream_process_header; | 702 c->read->handler = ngx_http_upstream_process_header; |
703 | 703 |
704 c->sendfile &= r->connection->sendfile; | 704 c->sendfile &= r->connection->sendfile; |
705 u->output.sendfile = c->sendfile; | |
705 | 706 |
706 c->pool = r->pool; | 707 c->pool = r->pool; |
707 c->read->log = c->write->log = c->log = r->connection->log; | 708 c->read->log = c->write->log = c->log = r->connection->log; |
708 | 709 |
709 /* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */ | 710 /* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */ |
2610 | 2611 |
2611 last = p; | 2612 last = p; |
2612 | 2613 |
2613 while (*++p == ' ') { /* void */ } | 2614 while (*++p == ' ') { /* void */ } |
2614 | 2615 |
2616 if (*p == '\0') { | |
2617 return NGX_OK; | |
2618 } | |
2619 | |
2615 if (ngx_strncasecmp(p, (u_char *) "charset=", 8) != 0) { | 2620 if (ngx_strncasecmp(p, (u_char *) "charset=", 8) != 0) { |
2616 continue; | 2621 continue; |
2617 } | 2622 } |
2618 | 2623 |
2619 p += 8; | 2624 p += 8; |
3198 s.len = value[i].len - 13; | 3203 s.len = value[i].len - 13; |
3199 s.data = &value[i].data[13]; | 3204 s.data = &value[i].data[13]; |
3200 | 3205 |
3201 fail_timeout = ngx_parse_time(&s, 1); | 3206 fail_timeout = ngx_parse_time(&s, 1); |
3202 | 3207 |
3203 if (fail_timeout < 0) { | 3208 if (fail_timeout == NGX_ERROR) { |
3204 goto invalid; | 3209 goto invalid; |
3205 } | 3210 } |
3206 | 3211 |
3207 continue; | 3212 continue; |
3208 } | 3213 } |