Mercurial > hg > nginx
comparison src/http/modules/ngx_http_uwsgi_module.c @ 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 |
comparison
equal
deleted
inserted
replaced
3544:6048c77cfbb2 | 3545:11c4f3a1e439 |
---|---|
373 } | 373 } |
374 } | 374 } |
375 | 375 |
376 u = r->upstream; | 376 u = r->upstream; |
377 | 377 |
378 u->schema.len = sizeof ("uwsgi://") - 1; | 378 ngx_str_set(&u->schema, "uwsgi://"); |
379 u->schema.data = (u_char *) "uwsgi://"; | |
380 | |
381 u->output.tag = (ngx_buf_tag_t) &ngx_http_uwsgi_module; | 379 u->output.tag = (ngx_buf_tag_t) &ngx_http_uwsgi_module; |
382 | 380 |
383 u->conf = &uwcf->upstream; | 381 u->conf = &uwcf->upstream; |
384 | 382 |
385 u->create_request = ngx_http_uwsgi_create_request; | 383 u->create_request = ngx_http_uwsgi_create_request; |
1070 } | 1068 } |
1071 | 1069 |
1072 h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash( | 1070 h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash( |
1073 ngx_hash ('s', 'e'), 'r'), 'v'), 'e'), 'r'); | 1071 ngx_hash ('s', 'e'), 'r'), 'v'), 'e'), 'r'); |
1074 | 1072 |
1075 h->key.len = sizeof("Server") - 1; | 1073 ngx_str_set(&h->key, "Server"); |
1076 h->key.data = (u_char *) "Server"; | 1074 ngx_str_null(&h->value); |
1077 h->value.len = 0; | |
1078 h->value.data = NULL; | |
1079 h->lowcase_key = (u_char *) "server"; | 1075 h->lowcase_key = (u_char *) "server"; |
1080 } | 1076 } |
1081 | 1077 |
1082 if (r->upstream->headers_in.date == NULL) { | 1078 if (r->upstream->headers_in.date == NULL) { |
1083 h = ngx_list_push(&r->upstream->headers_in.headers); | 1079 h = ngx_list_push(&r->upstream->headers_in.headers); |
1085 return NGX_ERROR; | 1081 return NGX_ERROR; |
1086 } | 1082 } |
1087 | 1083 |
1088 h->hash = ngx_hash(ngx_hash(ngx_hash('d', 'a'), 't'), 'e'); | 1084 h->hash = ngx_hash(ngx_hash(ngx_hash('d', 'a'), 't'), 'e'); |
1089 | 1085 |
1090 h->key.len = sizeof("Date") - 1; | 1086 ngx_str_set(&h->key, "Date"); |
1091 h->key.data = (u_char *) "Date"; | 1087 ngx_str_null(&h->value); |
1092 h->value.len = 0; | |
1093 h->value.data = NULL; | |
1094 h->lowcase_key = (u_char *) "date"; | 1088 h->lowcase_key = (u_char *) "date"; |
1095 } | 1089 } |
1096 | 1090 |
1097 return NGX_OK; | 1091 return NGX_OK; |
1098 } | 1092 } |