comparison src/http/modules/ngx_http_proxy_module.c @ 6043:613b14b305c7

Proxy: fixed proxy_set_body with proxy_cache. If the last header evaluation resulted in an empty header, the e.skip flag was set and was not reset when we've switched to evaluation of body_values. This incorrectly resulted in body values being skipped instead of producing some correct body as set by proxy_set_body. Fix is to properly reset the e.skip flag. As the problem only appeared if the last potentially non-empty header happened to be empty, it only manifested itself if proxy_set_body was used with proxy_cache.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 23 Mar 2015 19:28:54 +0300
parents cf2f8d91cf09
children a08fad30aeac
comparison
equal deleted inserted replaced
6042:abde398f34a7 6043:613b14b305c7
1377 *b->last++ = CR; *b->last++ = LF; 1377 *b->last++ = CR; *b->last++ = LF;
1378 1378
1379 if (plcf->body_values) { 1379 if (plcf->body_values) {
1380 e.ip = plcf->body_values->elts; 1380 e.ip = plcf->body_values->elts;
1381 e.pos = b->last; 1381 e.pos = b->last;
1382 e.skip = 0;
1382 1383
1383 while (*(uintptr_t *) e.ip) { 1384 while (*(uintptr_t *) e.ip) {
1384 code = *(ngx_http_script_code_pt *) e.ip; 1385 code = *(ngx_http_script_code_pt *) e.ip;
1385 code((ngx_http_script_engine_t *) &e); 1386 code((ngx_http_script_engine_t *) &e);
1386 } 1387 }