Mercurial > hg > nginx
changeset 3545:11c4f3a1e439
use ngx_str_set() and ngx_str_null()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 01 Jun 2010 16:12:00 +0000 |
parents | 6048c77cfbb2 |
children | 3a9fca8cbdfc |
files | src/http/modules/ngx_http_uwsgi_module.c |
diffstat | 1 files changed, 5 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_uwsgi_module.c Tue Jun 01 16:10:05 2010 +0000 +++ b/src/http/modules/ngx_http_uwsgi_module.c Tue Jun 01 16:12:00 2010 +0000 @@ -375,9 +375,7 @@ u = r->upstream; - u->schema.len = sizeof ("uwsgi://") - 1; - u->schema.data = (u_char *) "uwsgi://"; - + ngx_str_set(&u->schema, "uwsgi://"); u->output.tag = (ngx_buf_tag_t) &ngx_http_uwsgi_module; u->conf = &uwcf->upstream; @@ -1072,10 +1070,8 @@ h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash( ngx_hash ('s', 'e'), 'r'), 'v'), 'e'), 'r'); - h->key.len = sizeof("Server") - 1; - h->key.data = (u_char *) "Server"; - h->value.len = 0; - h->value.data = NULL; + ngx_str_set(&h->key, "Server"); + ngx_str_null(&h->value); h->lowcase_key = (u_char *) "server"; } @@ -1087,10 +1083,8 @@ h->hash = ngx_hash(ngx_hash(ngx_hash('d', 'a'), 't'), 'e'); - h->key.len = sizeof("Date") - 1; - h->key.data = (u_char *) "Date"; - h->value.len = 0; - h->value.data = NULL; + ngx_str_set(&h->key, "Date"); + ngx_str_null(&h->value); h->lowcase_key = (u_char *) "date"; }