#if 1
b = NULL;
for (cl = ctx->out; cl; cl = cl->next) {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "ssi out: %p %p", cl->buf, cl->buf->pos);
if (cl->buf == b) {
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
"the same buf was used in ssi");
var = params[NGX_HTTP_SSI_ECHO_VAR];
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "ssi echo \"%V\"", var);
+
key = 0;
for (i = 0; i < var->len; i++) {
name = params[NGX_HTTP_SSI_SET_VAR];
value = params[NGX_HTTP_SSI_SET_VALUE];
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "ssi set \"%V\" \"%V\"", name, value);
+
if (ngx_http_ssi_evaluate_string(r, ctx, value, 0) != NGX_OK) {
return NGX_HTTP_SSI_ERROR;
}
expr = params[NGX_HTTP_SSI_IF_EXPR];
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "ssi if expr=\"%V\"", expr);
+
left.data = expr->data;
last = expr->data + expr->len;
ngx_http_ssi_else(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx,
ngx_str_t **params)
{
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "ssi else");
+
if (ctx->output_chosen) {
ctx->output = 0;
} else {
ngx_http_ssi_endif(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx,
ngx_str_t **params)
{
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "ssi endif");
+
ctx->output = 1;
ctx->output_chosen = 0;
ctx->conditional = 0;
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
}
- r->connection->log->file = clcf->err_log->file;
- if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
- r->connection->log->log_level = clcf->err_log->log_level;
+ if (r == r->main) {
+ r->connection->log->file = clcf->err_log->file;
+ if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
+ r->connection->log->log_level = clcf->err_log->log_level;
+ }
}
if ((ngx_io.flags & NGX_IO_SENDFILE) && clcf->sendfile) {