comparison src/http/ngx_http_script.c @ 340:10cc350ed8a1 NGINX_0_6_14

nginx 0.6.14 *) Change: now by default the "echo" SSI command uses entity encoding. *) Feature: the "encoding" parameter in the "echo" SSI command. *) Feature: the "access_log" directive may be used inside the "limit_except" block. *) Bugfix: if all upstream servers were failed, then all servers had got weight the was equal one until servers became alive; bug appeared in 0.6.6. *) Bugfix: a segmentation fault occurred in worker process if $date_local and $date_gmt were used outside the ngx_http_ssi_filter_module. *) Bugfix: a segmentation fault might occur in worker process if debug log was enabled. Thanks to Andrei Nigmatulin. *) Bugfix: ngx_http_memcached_module did not set $upstream_response_time. Thanks to Maxim Dounin. *) Bugfix: a worker process may got caught in an endless loop, if the memcached was used. *) Bugfix: nginx supported low case only "close" and "keep-alive" values in the "Connection" request header line; bug appeared in 0.6.11. *) Bugfix: sub_filter did not work with empty substitution. *) Bugfix: in sub_filter parsing.
author Igor Sysoev <http://sysoev.ru>
date Mon, 15 Oct 2007 00:00:00 +0400
parents 3a91bfeffaba
children 4276c2f1f434
comparison
equal deleted inserted replaced
339:d19550b67059 340:10cc350ed8a1
312 ngx_http_core_main_conf_t *cmcf; 312 ngx_http_core_main_conf_t *cmcf;
313 313
314 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); 314 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
315 315
316 for (i = 0; i < cmcf->variables.nelts; i++) { 316 for (i = 0; i < cmcf->variables.nelts; i++) {
317 if (r->variables[i].no_cachable) { 317 if (r->variables[i].no_cacheable) {
318 r->variables[i].valid = 0; 318 r->variables[i].valid = 0;
319 r->variables[i].not_found = 0; 319 r->variables[i].not_found = 0;
320 } 320 }
321 } 321 }
322 322
349 return e.pos; 349 return e.pos;
350 } 350 }
351 351
352 352
353 void 353 void
354 ngx_http_script_flush_no_cachable_variables(ngx_http_request_t *r, 354 ngx_http_script_flush_no_cacheable_variables(ngx_http_request_t *r,
355 ngx_array_t *indices) 355 ngx_array_t *indices)
356 { 356 {
357 ngx_uint_t n, *index; 357 ngx_uint_t n, *index;
358 358
359 if (indices) { 359 if (indices) {
360 index = indices->elts; 360 index = indices->elts;
361 for (n = 0; n < indices->nelts; n++) { 361 for (n = 0; n < indices->nelts; n++) {
362 if (r->variables[index[n]].no_cachable) { 362 if (r->variables[index[n]].no_cacheable) {
363 r->variables[index[n]].valid = 0; 363 r->variables[index[n]].valid = 0;
364 r->variables[index[n]].not_found = 0; 364 r->variables[index[n]].not_found = 0;
365 } 365 }
366 } 366 }
367 } 367 }
1125 1125
1126 e->sp->len = code->text_len; 1126 e->sp->len = code->text_len;
1127 e->sp->data = (u_char *) code->text_data; 1127 e->sp->data = (u_char *) code->text_data;
1128 1128
1129 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, e->request->connection->log, 0, 1129 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, e->request->connection->log, 0,
1130 "http script value: \"%V\"", e->sp); 1130 "http script value: \"%v\"", e->sp);
1131 1131
1132 e->sp++; 1132 e->sp++;
1133 } 1133 }
1134 1134
1135 1135
1150 1150
1151 e->sp--; 1151 e->sp--;
1152 1152
1153 r->variables[code->index].len = e->sp->len; 1153 r->variables[code->index].len = e->sp->len;
1154 r->variables[code->index].valid = 1; 1154 r->variables[code->index].valid = 1;
1155 r->variables[code->index].no_cachable = 0; 1155 r->variables[code->index].no_cacheable = 0;
1156 r->variables[code->index].not_found = 0; 1156 r->variables[code->index].not_found = 0;
1157 r->variables[code->index].data = e->sp->data; 1157 r->variables[code->index].data = e->sp->data;
1158 } 1158 }
1159 1159
1160 1160