Mercurial > hg > nginx-vendor-0-5
comparison src/http/modules/ngx_http_fastcgi_module.c @ 126:df17fbafec8f NGINX_0_3_10
nginx 0.3.10
*) Change: the "valid_referers" directive and the "$invalid_referer"
variable were moved to the new ngx_http_referer_module from the
ngx_http_rewrite_module.
*) Change: the "$apache_bytes_sent" variable name was changed to
"$body_bytes_sent".
*) Feature: the "$sent_http_..." variables.
*) Feature: the "if" directive supports the "=" and "!=" operations.
*) Feature: the "proxy_pass" directive supports the HTTPS protocol.
*) Feature: the "proxy_set_body" directive.
*) Feature: the "post_action" directive.
*) Feature: the ngx_http_empty_gif_module.
*) Feature: the "worker_cpu_affinity" directive for Linux.
*) Bugfix: the "rewrite" directive did not unescape URI part in
redirect, now it is unescaped except the %00-%25 and %7F-%FF
characters.
*) Bugfix: nginx could not be built by the icc 9.0 compiler.
*) Bugfix: if the SSI was enabled for zero size static file, then the
chunked response was encoded incorrectly.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 15 Nov 2005 00:00:00 +0300 |
parents | d25a1d6034f1 |
children | 82d695e3d662 |
comparison
equal
deleted
inserted
replaced
125:97504de1f89e | 126:df17fbafec8f |
---|---|
554 | 554 |
555 for (i = 0; /* void */; i++) { | 555 for (i = 0; /* void */; i++) { |
556 | 556 |
557 if (i >= part->nelts) { | 557 if (i >= part->nelts) { |
558 if (part->next == NULL) { | 558 if (part->next == NULL) { |
559 break; | 559 break; |
560 } | 560 } |
561 | 561 |
562 part = part->next; | 562 part = part->next; |
563 header = part->elts; | 563 header = part->elts; |
564 i = 0; | 564 i = 0; |
565 } | 565 } |
566 | 566 |
568 if (len > 127) { | 568 if (len > 127) { |
569 *b->last++ = (u_char) (((len >> 24) & 0x7f) | 0x80); | 569 *b->last++ = (u_char) (((len >> 24) & 0x7f) | 0x80); |
570 *b->last++ = (u_char) ((len >> 16) & 0xff); | 570 *b->last++ = (u_char) ((len >> 16) & 0xff); |
571 *b->last++ = (u_char) ((len >> 8) & 0xff); | 571 *b->last++ = (u_char) ((len >> 8) & 0xff); |
572 *b->last++ = (u_char) (len & 0xff); | 572 *b->last++ = (u_char) (len & 0xff); |
573 | 573 |
574 } else { | 574 } else { |
575 *b->last++ = (u_char) len; | 575 *b->last++ = (u_char) len; |
576 } | 576 } |
577 | 577 |
578 len = header[i].value.len; | 578 len = header[i].value.len; |
874 line.len = f->length; | 874 line.len = f->length; |
875 u->header_in.pos += f->length; | 875 u->header_in.pos += f->length; |
876 f->length = 0; | 876 f->length = 0; |
877 f->state = ngx_http_fastcgi_st_padding; | 877 f->state = ngx_http_fastcgi_st_padding; |
878 | 878 |
879 } else { | 879 } else { |
880 line.len = u->header_in.last - u->header_in.pos; | 880 line.len = u->header_in.last - u->header_in.pos; |
881 f->length -= u->header_in.last - u->header_in.pos; | 881 f->length -= u->header_in.last - u->header_in.pos; |
882 u->header_in.pos = u->header_in.last; | 882 u->header_in.pos = u->header_in.last; |
883 } | 883 } |
884 | 884 |
1143 line.len = f->length; | 1143 line.len = f->length; |
1144 f->pos += f->length; | 1144 f->pos += f->length; |
1145 f->length = 0; | 1145 f->length = 0; |
1146 f->state = ngx_http_fastcgi_st_padding; | 1146 f->state = ngx_http_fastcgi_st_padding; |
1147 | 1147 |
1148 } else { | 1148 } else { |
1149 line.len = f->last - f->pos; | 1149 line.len = f->last - f->pos; |
1150 f->length -= f->last - f->pos; | 1150 f->length -= f->last - f->pos; |
1151 f->pos = f->last; | 1151 f->pos = f->last; |
1152 } | 1152 } |
1153 | 1153 |
1445 | 1445 |
1446 conf->upstream.send_lowat = NGX_CONF_UNSET_SIZE; | 1446 conf->upstream.send_lowat = NGX_CONF_UNSET_SIZE; |
1447 conf->upstream.header_buffer_size = NGX_CONF_UNSET_SIZE; | 1447 conf->upstream.header_buffer_size = NGX_CONF_UNSET_SIZE; |
1448 | 1448 |
1449 conf->upstream.busy_buffers_size_conf = NGX_CONF_UNSET_SIZE; | 1449 conf->upstream.busy_buffers_size_conf = NGX_CONF_UNSET_SIZE; |
1450 conf->upstream.max_temp_file_size_conf = NGX_CONF_UNSET_SIZE; | 1450 conf->upstream.max_temp_file_size_conf = NGX_CONF_UNSET_SIZE; |
1451 conf->upstream.temp_file_write_size_conf = NGX_CONF_UNSET_SIZE; | 1451 conf->upstream.temp_file_write_size_conf = NGX_CONF_UNSET_SIZE; |
1452 | 1452 |
1453 conf->upstream.max_fails = NGX_CONF_UNSET_UINT; | 1453 conf->upstream.max_fails = NGX_CONF_UNSET_UINT; |
1454 conf->upstream.fail_timeout = NGX_CONF_UNSET; | 1454 conf->upstream.fail_timeout = NGX_CONF_UNSET; |
1455 | 1455 |
1495 prev->upstream.read_timeout, 60000); | 1495 prev->upstream.read_timeout, 60000); |
1496 | 1496 |
1497 ngx_conf_merge_size_value(conf->upstream.send_lowat, | 1497 ngx_conf_merge_size_value(conf->upstream.send_lowat, |
1498 prev->upstream.send_lowat, 0); | 1498 prev->upstream.send_lowat, 0); |
1499 | 1499 |
1500 ngx_conf_merge_size_value(conf->upstream.header_buffer_size, | 1500 ngx_conf_merge_size_value(conf->upstream.header_buffer_size, |
1501 prev->upstream.header_buffer_size, | 1501 prev->upstream.header_buffer_size, |
1502 (size_t) ngx_pagesize); | 1502 (size_t) ngx_pagesize); |
1503 | 1503 |
1504 | 1504 |
1505 ngx_conf_merge_bufs_value(conf->upstream.bufs, prev->upstream.bufs, | 1505 ngx_conf_merge_bufs_value(conf->upstream.bufs, prev->upstream.bufs, |
1691 | 1691 |
1692 copy = ngx_array_push_n(conf->params, size); | 1692 copy = ngx_array_push_n(conf->params, size); |
1693 if (copy == NULL) { | 1693 if (copy == NULL) { |
1694 return NGX_CONF_ERROR; | 1694 return NGX_CONF_ERROR; |
1695 } | 1695 } |
1696 | 1696 |
1697 copy->code = ngx_http_script_copy_code; | 1697 copy->code = ngx_http_script_copy_code; |
1698 copy->len = src[i].key.len + src[i].value.len; | 1698 copy->len = src[i].key.len + src[i].value.len; |
1699 | 1699 |
1700 p = (u_char *) copy + sizeof(ngx_http_script_copy_code_t); | 1700 p = (u_char *) copy + sizeof(ngx_http_script_copy_code_t); |
1701 | 1701 |
1720 | 1720 |
1721 copy = ngx_array_push_n(conf->params, size); | 1721 copy = ngx_array_push_n(conf->params, size); |
1722 if (copy == NULL) { | 1722 if (copy == NULL) { |
1723 return NGX_CONF_ERROR; | 1723 return NGX_CONF_ERROR; |
1724 } | 1724 } |
1725 | 1725 |
1726 copy->code = ngx_http_script_copy_code; | 1726 copy->code = ngx_http_script_copy_code; |
1727 copy->len = src[i].key.len; | 1727 copy->len = src[i].key.len; |
1728 | 1728 |
1729 p = (u_char *) copy + sizeof(ngx_http_script_copy_code_t); | 1729 p = (u_char *) copy + sizeof(ngx_http_script_copy_code_t); |
1730 ngx_memcpy(p, src[i].key.data, src[i].key.len); | 1730 ngx_memcpy(p, src[i].key.data, src[i].key.len); |
1775 ngx_http_variable_value_t *v, uintptr_t data) | 1775 ngx_http_variable_value_t *v, uintptr_t data) |
1776 { | 1776 { |
1777 u_char *p; | 1777 u_char *p; |
1778 ngx_http_fastcgi_loc_conf_t *flcf; | 1778 ngx_http_fastcgi_loc_conf_t *flcf; |
1779 | 1779 |
1780 v->valid = 1; | 1780 v->valid = 1; |
1781 v->no_cachable = 0; | 1781 v->no_cachable = 0; |
1782 v->not_found = 0; | 1782 v->not_found = 0; |
1783 | 1783 |
1784 flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module); | 1784 flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module); |
1785 | 1785 |
1848 } else { | 1848 } else { |
1849 ngx_memzero(&inet_upstream, sizeof(ngx_inet_upstream_t)); | 1849 ngx_memzero(&inet_upstream, sizeof(ngx_inet_upstream_t)); |
1850 | 1850 |
1851 inet_upstream.name = value[1]; | 1851 inet_upstream.name = value[1]; |
1852 inet_upstream.url = value[1]; | 1852 inet_upstream.url = value[1]; |
1853 | 1853 |
1854 lcf->peers = ngx_inet_upstream_parse(cf, &inet_upstream); | 1854 lcf->peers = ngx_inet_upstream_parse(cf, &inet_upstream); |
1855 if (lcf->peers == NULL) { | 1855 if (lcf->peers == NULL) { |
1856 return NGX_CONF_ERROR; | 1856 return NGX_CONF_ERROR; |
1857 } | 1857 } |
1858 } | 1858 } |