Klaus Demo nginx / fab5acd
fix recursive perl_set variable call Igor Sysoev 15 years ago
1 changed file(s) with 19 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
299299 ngx_http_perl_variable_t *pv = (ngx_http_perl_variable_t *) data;
300300
301301 ngx_int_t rc;
302 ngx_uint_t recursive;
302303 ngx_str_t value;
303304 ngx_http_perl_ctx_t *ctx;
304305 ngx_http_perl_main_conf_t *pmcf;
315316 }
316317
317318 ngx_http_set_ctx(r, ctx, ngx_http_perl_module);
318 }
319
320 pmcf = ngx_http_get_module_main_conf(r, ngx_http_perl_module);
321
322 rc = ngx_http_perl_get_interpreter(pmcf, &ctx->perl, r->connection->log);
323
324 if (rc != NGX_OK) {
325 return rc;
319
320 pmcf = ngx_http_get_module_main_conf(r, ngx_http_perl_module);
321
322 rc = ngx_http_perl_get_interpreter(pmcf, &ctx->perl,
323 r->connection->log);
324
325 if (rc != NGX_OK) {
326 return rc;
327 }
328
329 recursive = 0;
330
331 } else {
332 pmcf = NULL;
333 recursive = 1;
326334 }
327335
328336 value.data = NULL;
336344
337345 }
338346
339 ngx_http_perl_free_interpreter(pmcf, ctx->perl);
347 if (recursive == 0) {
348 ngx_http_perl_free_interpreter(pmcf, ctx->perl);
349 }
340350
341351 if (value.data) {
342352 v->len = value.len;