use ngx_str_set() and ngx_str_null()

This commit is contained in:
Igor Sysoev 2010-06-01 16:12:00 +00:00
parent a754521af5
commit 94be6be50a

View File

@ -375,9 +375,7 @@ ngx_http_uwsgi_handler(ngx_http_request_t *r)
u = r->upstream; u = r->upstream;
u->schema.len = sizeof ("uwsgi://") - 1; ngx_str_set(&u->schema, "uwsgi://");
u->schema.data = (u_char *) "uwsgi://";
u->output.tag = (ngx_buf_tag_t) &ngx_http_uwsgi_module; u->output.tag = (ngx_buf_tag_t) &ngx_http_uwsgi_module;
u->conf = &uwcf->upstream; 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( h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash(
ngx_hash ('s', 'e'), 'r'), 'v'), 'e'), 'r'); ngx_hash ('s', 'e'), 'r'), 'v'), 'e'), 'r');
h->key.len = sizeof("Server") - 1; ngx_str_set(&h->key, "Server");
h->key.data = (u_char *) "Server"; ngx_str_null(&h->value);
h->value.len = 0;
h->value.data = NULL;
h->lowcase_key = (u_char *) "server"; 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->hash = ngx_hash(ngx_hash(ngx_hash('d', 'a'), 't'), 'e');
h->key.len = sizeof("Date") - 1; ngx_str_set(&h->key, "Date");
h->key.data = (u_char *) "Date"; ngx_str_null(&h->value);
h->value.len = 0;
h->value.data = NULL;
h->lowcase_key = (u_char *) "date"; h->lowcase_key = (u_char *) "date";
} }