diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-06-01 16:12:00 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-06-01 16:12:00 +0000 |
commit | 94be6be50afe8f087961a02f5109d24c35e81a0c (patch) | |
tree | 6b61063c3a4a4c4467c31590d402a08e67524c69 /src | |
parent | a754521af5984f3667b792bf8db01e2750f485f8 (diff) | |
download | nginx-94be6be50afe8f087961a02f5109d24c35e81a0c.tar.gz nginx-94be6be50afe8f087961a02f5109d24c35e81a0c.zip |
use ngx_str_set() and ngx_str_null()
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_uwsgi_module.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c index 879640c33..f840d0d7d 100644 --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -375,9 +375,7 @@ ngx_http_uwsgi_handler(ngx_http_request_t *r) 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 @@ ngx_http_uwsgi_process_header(ngx_http_request_t *r) 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 @@ ngx_http_uwsgi_process_header(ngx_http_request_t *r) 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"; } |