comparison src/http/modules/ngx_http_ssi_filter_module.c @ 244:500a3242dff6 NGINX_0_4_7

nginx 0.4.7 *) Feature: the ngx_http_flv_module. *) Feature: the $request_body_file variable. *) Feature: the "charset" and "source_charset" directives support the variables. *) Bugfix: if an "include" SSI command were before another "include" SSI command with an "wait" parameter, then the "wait" parameter might not work. *) Bugfix: if the "proxy_buffering off" directive was used or while working with memcached the connections might not be closed on timeout. *) Bugfix: nginx did not run on 64-bit platforms except amd64, sparc64, and ppc64.
author Igor Sysoev <http://sysoev.ru>
date Tue, 10 Oct 2006 00:00:00 +0400
parents c982febb7588
children b52bd034c577
comparison
equal deleted inserted replaced
243:d371c9d33781 244:500a3242dff6
415 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 415 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
416 "http ssi filter \"%V\" wait", &r->uri); 416 "http ssi filter \"%V\" wait", &r->uri);
417 return NGX_AGAIN; 417 return NGX_AGAIN;
418 } 418 }
419 419
420 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 420 if (ctx->wait == r) {
421 "http ssi filter \"%V\" continue", &r->uri); 421 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
422 422 "http ssi filter \"%V\" continue", &r->uri);
423 ctx->wait = 0; 423 ctx->wait = NULL;
424 }
424 } 425 }
425 426
426 slcf = ngx_http_get_module_loc_conf(r, ngx_http_ssi_filter_module); 427 slcf = ngx_http_get_module_loc_conf(r, ngx_http_ssi_filter_module);
427 428
428 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 429 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1812 ngx_int_t rc; 1813 ngx_int_t rc;
1813 ngx_str_t *uri, *file, *wait, *stub, args; 1814 ngx_str_t *uri, *file, *wait, *stub, args;
1814 ngx_buf_t *b; 1815 ngx_buf_t *b;
1815 ngx_uint_t flags, i; 1816 ngx_uint_t flags, i;
1816 ngx_chain_t *out, *cl, *tl, **ll; 1817 ngx_chain_t *out, *cl, *tl, **ll;
1818 ngx_http_request_t *sr;
1817 ngx_http_ssi_ctx_t *mctx; 1819 ngx_http_ssi_ctx_t *mctx;
1818 ngx_http_ssi_block_t *bl; 1820 ngx_http_ssi_block_t *bl;
1819 1821
1820 uri = params[NGX_HTTP_SSI_INCLUDE_VIRTUAL]; 1822 uri = params[NGX_HTTP_SSI_INCLUDE_VIRTUAL];
1821 file = params[NGX_HTTP_SSI_INCLUDE_FILE]; 1823 file = params[NGX_HTTP_SSI_INCLUDE_FILE];
1934 } else { 1936 } else {
1935 out = bl[i].bufs; 1937 out = bl[i].bufs;
1936 } 1938 }
1937 } 1939 }
1938 1940
1939 rc = ngx_http_subrequest(r, uri, &args, out, flags); 1941 rc = ngx_http_subrequest(r, uri, &args, &sr, out, flags);
1940 1942
1941 if (rc == NGX_ERROR) { 1943 if (rc == NGX_ERROR) {
1942 return NGX_HTTP_SSI_ERROR; 1944 return NGX_HTTP_SSI_ERROR;
1943 } 1945 }
1944 1946
1945 if (wait == NULL) { 1947 if (wait == NULL) {
1946 return NGX_OK; 1948 return NGX_OK;
1947 } 1949 }
1948 1950
1949 if (rc == NGX_AGAIN) { 1951 if (rc == NGX_AGAIN) {
1950 ctx->wait = 1; 1952 if (ctx->wait == NULL) {
1953 ctx->wait = sr;
1954
1955 } else {
1956 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1957 "only one subrequest may be waited at the same time");
1958 }
1951 } 1959 }
1952 1960
1953 return rc; 1961 return rc;
1954 } 1962 }
1955 1963