diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-07-14 16:51:53 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-07-14 16:51:53 +0400 |
commit | 187b7d95589f674ce3262b05c311554bcd8f847c (patch) | |
tree | 0ac48dad3e3204d12837c2562d99020eafe29038 /src/http/modules/ngx_http_fastcgi_module.c | |
parent | b3ad9f30d960bd1dcc3d8fd5c9963bf3e93bb7b3 (diff) |
nginx-0.1.39-RELEASE importrelease-0.1.39
*) The changes in the ngx_http_charset_module: the "default_charset"
directive was canceled; the "charset" directive sets the response
charset; the "source_charset" directive sets the source charset only.
*) Bugfix: the backend "WWW-Authenticate" header line did not
transferred while the 401 response code redirecting.
*) Bugfix: the ngx_http_proxy_module and ngx_http_fastcgi_module may
close a connection before anything was transferred to a client; the
bug had appeared in 0.1.38.
*) Workaround: the Linux glibc crypt_r() initialization bug.
*) Bugfix: the ngx_http_ssi_module did not support the relative URI in
the "include virtual" command.
*) Bugfix: if the backend response had the "Location" header line and
nginx should not rewrite this line, then the 500 code response body
was transferred; the bug had appeared in 0.1.29.
*) Bugfix: some directives of the ngx_http_proxy_module and
ngx_http_fastcgi_module were not inherited from the server to the
location level; the bug had appeared in 0.1.29.
*) Bugfix: the ngx_http_ssl_module did not support the certificate
chain.
*) Bugfix: the ngx_http_autoindex_module did not show correctly the
long file names; the bug had appeared in 0.1.38.
*) Bugfixes in IMAP/POP3 proxy in interaction with a backend at the
login state.
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r-- | src/http/modules/ngx_http_fastcgi_module.c | 76 |
1 files changed, 44 insertions, 32 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 0e74528d7..480a22895 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -277,7 +277,7 @@ static ngx_command_t ngx_http_fastcgi_commands[] = { NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_size_slot, NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_fastcgi_loc_conf_t, upstream.busy_buffers_size), + offsetof(ngx_http_fastcgi_loc_conf_t, upstream.busy_buffers_size_conf), NULL }, { ngx_string("fastcgi_temp_path"), @@ -291,14 +291,14 @@ static ngx_command_t ngx_http_fastcgi_commands[] = { NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_size_slot, NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_fastcgi_loc_conf_t, upstream.max_temp_file_size), + offsetof(ngx_http_fastcgi_loc_conf_t, upstream.max_temp_file_size_conf), NULL }, { ngx_string("fastcgi_temp_file_write_size"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_size_slot, NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_fastcgi_loc_conf_t, upstream.temp_file_write_size), + offsetof(ngx_http_fastcgi_loc_conf_t, upstream.temp_file_write_size_conf), NULL }, { ngx_string("fastcgi_next_upstream"), @@ -1001,16 +1001,16 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r) return NGX_HTTP_INTERNAL_SERVER_ERROR; } - r->headers_out.status = status; - r->headers_out.status_line = *status_line; + u->headers_in.status_n = status; + u->headers_in.status_line = *status_line; } else { - r->headers_out.status = 200; - r->headers_out.status_line.len = sizeof("200 OK") - 1; - r->headers_out.status_line.data = (u_char *) "200 OK"; + u->headers_in.status_n = 200; + u->headers_in.status_line.len = sizeof("200 OK") - 1; + u->headers_in.status_line.data = (u_char *) "200 OK"; } - u->state->status = r->headers_out.status; + u->state->status = u->headers_in.status_n; #if 0 if (u->cachable) { u->cachable = ngx_http_upstream_is_cachable(r); @@ -1452,9 +1452,10 @@ ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf) conf->upstream.send_lowat = NGX_CONF_UNSET_SIZE; conf->upstream.header_buffer_size = NGX_CONF_UNSET_SIZE; - conf->upstream.busy_buffers_size = NGX_CONF_UNSET_SIZE; - conf->upstream.max_temp_file_size = NGX_CONF_UNSET_SIZE; - conf->upstream.temp_file_write_size = NGX_CONF_UNSET_SIZE; + + conf->upstream.busy_buffers_size_conf = NGX_CONF_UNSET_SIZE; + conf->upstream.max_temp_file_size_conf = NGX_CONF_UNSET_SIZE; + conf->upstream.temp_file_write_size_conf = NGX_CONF_UNSET_SIZE; conf->upstream.pass_unparsed_uri = NGX_CONF_UNSET; conf->upstream.method = NGX_CONF_UNSET_UINT; @@ -1523,23 +1524,28 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) } - ngx_conf_merge_size_value(conf->upstream.busy_buffers_size, - prev->upstream.busy_buffers_size, + ngx_conf_merge_size_value(conf->upstream.busy_buffers_size_conf, + prev->upstream.busy_buffers_size_conf, NGX_CONF_UNSET_SIZE); - if (conf->upstream.busy_buffers_size == NGX_CONF_UNSET_SIZE) { + if (conf->upstream.busy_buffers_size_conf == NGX_CONF_UNSET_SIZE) { conf->upstream.busy_buffers_size = 2 * size; + } else { + conf->upstream.busy_buffers_size = + conf->upstream.busy_buffers_size_conf; + } - } else if (conf->upstream.busy_buffers_size < size) { + if (conf->upstream.busy_buffers_size < size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"fastcgi_busy_buffers_size\" must be equal or bigger than " "maximum of the value of \"fastcgi_header_buffer_size\" and " "one of the \"fastcgi_buffers\""); return NGX_CONF_ERROR; + } - } else if (conf->upstream.busy_buffers_size - > (conf->upstream.bufs.num - 1) * conf->upstream.bufs.size) + if (conf->upstream.busy_buffers_size + > (conf->upstream.bufs.num - 1) * conf->upstream.bufs.size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"fastcgi_busy_buffers_size\" must be less than " @@ -1549,14 +1555,18 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) } - ngx_conf_merge_size_value(conf->upstream.temp_file_write_size, - prev->upstream.temp_file_write_size, + ngx_conf_merge_size_value(conf->upstream.temp_file_write_size_conf, + prev->upstream.temp_file_write_size_conf, NGX_CONF_UNSET_SIZE); - if (conf->upstream.temp_file_write_size == NGX_CONF_UNSET_SIZE) { + if (conf->upstream.temp_file_write_size_conf == NGX_CONF_UNSET_SIZE) { conf->upstream.temp_file_write_size = 2 * size; + } else { + conf->upstream.temp_file_write_size = + conf->upstream.temp_file_write_size_conf; + } - } else if (conf->upstream.temp_file_write_size < size) { + if (conf->upstream.temp_file_write_size < size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"fastcgi_temp_file_write_size\" must be equal or bigger than " "maximum of the value of \"fastcgi_header_buffer_size\" and " @@ -1566,16 +1576,19 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) } - ngx_conf_merge_size_value(conf->upstream.max_temp_file_size, - prev->upstream.max_temp_file_size, + ngx_conf_merge_size_value(conf->upstream.max_temp_file_size_conf, + prev->upstream.max_temp_file_size_conf, NGX_CONF_UNSET_SIZE); - if (conf->upstream.max_temp_file_size == NGX_CONF_UNSET_SIZE) { - + if (conf->upstream.max_temp_file_size_conf == NGX_CONF_UNSET_SIZE) { conf->upstream.max_temp_file_size = 1024 * 1024 * 1024; + } else { + conf->upstream.max_temp_file_size = + conf->upstream.max_temp_file_size_conf; + } - } else if (conf->upstream.max_temp_file_size != 0 - && conf->upstream.max_temp_file_size < size) + if (conf->upstream.max_temp_file_size != 0 + && conf->upstream.max_temp_file_size < size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"fastcgi_max_temp_file_size\" must be equal to zero to disable " @@ -1598,7 +1611,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) NGX_HTTP_FASTCGI_TEMP_PATH, 1, 2, 0, ngx_garbage_collector_temp_handler, cf); - ngx_conf_merge_msec_value(conf->upstream.pass_unparsed_uri, + ngx_conf_merge_value(conf->upstream.pass_unparsed_uri, prev->upstream.pass_unparsed_uri, 0); if (conf->upstream.pass_unparsed_uri && conf->upstream.location->len > 1) { @@ -1617,10 +1630,10 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) ngx_conf_merge_value(conf->upstream.pass_request_body, prev->upstream.pass_request_body, 1); - ngx_conf_merge_msec_value(conf->upstream.redirect_errors, + ngx_conf_merge_value(conf->upstream.redirect_errors, prev->upstream.redirect_errors, 0); - ngx_conf_merge_msec_value(conf->upstream.pass_x_powered_by, + ngx_conf_merge_value(conf->upstream.pass_x_powered_by, prev->upstream.pass_x_powered_by, 1); @@ -1628,7 +1641,6 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) if (conf->peers == NULL) { conf->peers = prev->peers; - conf->upstream = prev->upstream; } if (conf->params_source == NULL) { |