Klaus Demo nginx / c909808
fix proxy_redirect with variable Igor Sysoev 15 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
13961396 e.ip = pr->replacement.vars.lengths;
13971397 e.request = r;
13981398
1399 for (len = prefix; *(uintptr_t *) e.ip; len += lcode(&e)) {
1399 len = prefix + h->value.len - pr->redirect.len;
1400
1401 while (*(uintptr_t *) e.ip) {
14001402 lcode = *(ngx_http_script_len_code_pt *) e.ip;
1403 len += lcode(&e);
14011404 }
14021405
14031406 data = ngx_palloc(r->pool, len);
14161419 code = *(ngx_http_script_code_pt *) e.ip;
14171420 code(&e);
14181421 }
1422
1423 ngx_memcpy(e.pos, h->value.data + prefix + pr->redirect.len,
1424 h->value.len - pr->redirect.len - prefix);
14191425
14201426 h->value.len = len;
14211427 h->value.data = data;