comparison src/http/modules/ngx_http_userid_filter_module.c @ 206:3866d57d9cfd NGINX_0_3_50

nginx 0.3.50 *) Change: the "proxy_redirect_errors" and "fastcgi_redirect_errors" directives was renamed to the "proxy_intercept_errors" and "fastcgi_intercept_errors" directives. *) Feature: the ngx_http_charset_module supports the recoding from the single byte encodings to the UTF-8 encoding and back. *) Feature: the "X-Accel-Charset" response header line is supported in proxy and FastCGI mode. *) Bugfix: the "\" escape symbol in the "\"" and "\'" pairs in the SSI command was removed only if the command also has the "$" symbol. *) Bugfix: the "<!--" string might be added on some conditions in the SSI after inclusion. *) Bugfix: if the "Content-Length: 0" header line was in response, then in nonbuffered proxying mode the client connection was not closed.
author Igor Sysoev <http://sysoev.ru>
date Wed, 28 Jun 2006 00:00:00 +0400
parents 54aabf2b0bc6
children 56688ed172c8
comparison
equal deleted inserted replaced
205:e53bd15c244a 206:3866d57d9cfd
592 { 592 {
593 uint32_t *uid; 593 uint32_t *uid;
594 ngx_http_userid_ctx_t *ctx; 594 ngx_http_userid_ctx_t *ctx;
595 ngx_http_userid_conf_t *conf; 595 ngx_http_userid_conf_t *conf;
596 596
597 v->valid = 1;
598 v->no_cachable = 0;
599 v->not_found = 0;
600
601 ctx = ngx_http_get_module_ctx(r, ngx_http_userid_filter_module); 597 ctx = ngx_http_get_module_ctx(r, ngx_http_userid_filter_module);
602 598
603 uid = (uint32_t *) ((char *) ctx + data); 599 uid = (uint32_t *) ((char *) ctx + data);
604 600
605 if (ctx == NULL || uid[3] == 0) { 601 if (ctx == NULL || uid[3] == 0) {
612 v->len = conf->name.len + sizeof("=00001111222233334444555566667777") - 1; 608 v->len = conf->name.len + sizeof("=00001111222233334444555566667777") - 1;
613 v->data = ngx_palloc(r->pool, v->len); 609 v->data = ngx_palloc(r->pool, v->len);
614 if (v->data == NULL) { 610 if (v->data == NULL) {
615 return NGX_ERROR; 611 return NGX_ERROR;
616 } 612 }
613
614 v->valid = 1;
615 v->no_cachable = 0;
616 v->not_found = 0;
617 617
618 ngx_sprintf(v->data, "%V=%08XD%08XD%08XD%08XD", 618 ngx_sprintf(v->data, "%V=%08XD%08XD%08XD%08XD",
619 &conf->name, uid[0], uid[1], uid[2], uid[3]); 619 &conf->name, uid[0], uid[1], uid[2], uid[3]);
620 620
621 return NGX_OK; 621 return NGX_OK;