Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_userid_filter_module.c @ 382:984bb0b1399b NGINX_0_7_3
nginx 0.7.3
*) Change: the "rss" extension MIME type has been changed to
"application/rss+xml".
*) Change: now the "gzip_vary" directive turned on issues a
"Vary: Accept-Encoding" header line for uncompressed responses too.
*) Feature: now the "rewrite" directive does a redirect automatically
if the "https://" protocol is used.
*) Bugfix: the "proxy_pass" directive did not work with the HTTPS
protocol; the bug had appeared in 0.6.9.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 23 Jun 2008 00:00:00 +0400 |
parents | edf1cb6c328e |
children | a8424ffa495c |
comparison
equal
deleted
inserted
replaced
381:23d1555141d9 | 382:984bb0b1399b |
---|---|
418 | 418 |
419 if (conf->domain.len) { | 419 if (conf->domain.len) { |
420 len += conf->domain.len; | 420 len += conf->domain.len; |
421 } | 421 } |
422 | 422 |
423 cookie = ngx_palloc(r->pool, len); | 423 cookie = ngx_pnalloc(r->pool, len); |
424 if (cookie == NULL) { | 424 if (cookie == NULL) { |
425 return NGX_ERROR; | 425 return NGX_ERROR; |
426 } | 426 } |
427 | 427 |
428 p = ngx_copy(cookie, conf->name.data, conf->name.len); | 428 p = ngx_copy(cookie, conf->name.data, conf->name.len); |
494 static ngx_int_t | 494 static ngx_int_t |
495 ngx_http_userid_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, | 495 ngx_http_userid_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, |
496 ngx_str_t *name, uint32_t *uid) | 496 ngx_str_t *name, uint32_t *uid) |
497 { | 497 { |
498 v->len = name->len + sizeof("=00001111222233334444555566667777") - 1; | 498 v->len = name->len + sizeof("=00001111222233334444555566667777") - 1; |
499 v->data = ngx_palloc(r->pool, v->len); | 499 v->data = ngx_pnalloc(r->pool, v->len); |
500 if (v->data == NULL) { | 500 if (v->data == NULL) { |
501 return NGX_ERROR; | 501 return NGX_ERROR; |
502 } | 502 } |
503 | 503 |
504 v->valid = 1; | 504 v->valid = 1; |
618 domain->data = (u_char *) ""; | 618 domain->data = (u_char *) ""; |
619 | 619 |
620 return NGX_CONF_OK; | 620 return NGX_CONF_OK; |
621 } | 621 } |
622 | 622 |
623 new = ngx_palloc(cf->pool, sizeof("; domain=") - 1 + domain->len); | 623 new = ngx_pnalloc(cf->pool, sizeof("; domain=") - 1 + domain->len); |
624 if (new == NULL) { | 624 if (new == NULL) { |
625 return NGX_CONF_ERROR; | 625 return NGX_CONF_ERROR; |
626 } | 626 } |
627 | 627 |
628 p = ngx_cpymem(new, "; domain=", sizeof("; domain=") - 1); | 628 p = ngx_cpymem(new, "; domain=", sizeof("; domain=") - 1); |
640 { | 640 { |
641 ngx_str_t *path = data; | 641 ngx_str_t *path = data; |
642 | 642 |
643 u_char *p, *new; | 643 u_char *p, *new; |
644 | 644 |
645 new = ngx_palloc(cf->pool, sizeof("; path=") - 1 + path->len); | 645 new = ngx_pnalloc(cf->pool, sizeof("; path=") - 1 + path->len); |
646 if (new == NULL) { | 646 if (new == NULL) { |
647 return NGX_CONF_ERROR; | 647 return NGX_CONF_ERROR; |
648 } | 648 } |
649 | 649 |
650 p = ngx_cpymem(new, "; path=", sizeof("; path=") - 1); | 650 p = ngx_cpymem(new, "; path=", sizeof("; path=") - 1); |