comparison src/http/modules/ngx_http_headers_filter_module.c @ 2049:2a92804f4109

*) back out r2040 *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Jun 2008 15:00:30 +0000
parents 4c685f02a5a0
children 3e8a4d057b77
comparison
equal deleted inserted replaced
2048:824615f3b4ec 2049:2a92804f4109
262 cc->value.data = (u_char *) "max-age=315360000"; 262 cc->value.data = (u_char *) "max-age=315360000";
263 263
264 return NGX_OK; 264 return NGX_OK;
265 } 265 }
266 266
267 expires->value.data = ngx_palloc(r->pool, len); 267 expires->value.data = ngx_pnalloc(r->pool, len);
268 if (expires->value.data == NULL) { 268 if (expires->value.data == NULL) {
269 return NGX_ERROR; 269 return NGX_ERROR;
270 } 270 }
271 271
272 if (conf->expires_time == 0) { 272 if (conf->expires_time == 0) {
295 cc->value.data = (u_char *) "no-cache"; 295 cc->value.data = (u_char *) "no-cache";
296 296
297 return NGX_OK; 297 return NGX_OK;
298 } 298 }
299 299
300 cc->value.data = ngx_palloc(r->pool, 300 cc->value.data = ngx_pnalloc(r->pool,
301 sizeof("max-age=") + NGX_TIME_T_LEN + 1); 301 sizeof("max-age=") + NGX_TIME_T_LEN + 1);
302 if (cc->value.data == NULL) { 302 if (cc->value.data == NULL) {
303 return NGX_ERROR; 303 return NGX_ERROR;
304 } 304 }
305 305
306 cc->value.len = ngx_sprintf(cc->value.data, "max-age=%T", 306 cc->value.len = ngx_sprintf(cc->value.data, "max-age=%T",