comparison src/http/ngx_http_request.c @ 2135:8c6521eedf84

ngx_strlow()
author Igor Sysoev <igor@sysoev.ru>
date Mon, 04 Aug 2008 10:07:00 +0000
parents 9697407e9ecb
children 7a7c9e9024dd
comparison
equal deleted inserted replaced
2134:13652cba8633 2135:8c6521eedf84
816 ngx_http_process_request_headers(ngx_event_t *rev) 816 ngx_http_process_request_headers(ngx_event_t *rev)
817 { 817 {
818 ssize_t n; 818 ssize_t n;
819 ngx_int_t rc, rv; 819 ngx_int_t rc, rv;
820 ngx_str_t header; 820 ngx_str_t header;
821 ngx_uint_t i;
822 ngx_table_elt_t *h; 821 ngx_table_elt_t *h;
823 ngx_connection_t *c; 822 ngx_connection_t *c;
824 ngx_http_header_t *hh; 823 ngx_http_header_t *hh;
825 ngx_http_request_t *r; 824 ngx_http_request_t *r;
826 ngx_http_core_srv_conf_t *cscf; 825 ngx_http_core_srv_conf_t *cscf;
926 925
927 if (h->key.len == r->lowcase_index) { 926 if (h->key.len == r->lowcase_index) {
928 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); 927 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
929 928
930 } else { 929 } else {
931 for (i = 0; i < h->key.len; i++) { 930 ngx_strlow(h->lowcase_key, h->key.data, h->key.len);
932 h->lowcase_key[i] = ngx_tolower(h->key.data[i]);
933 }
934 } 931 }
935 932
936 hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash, 933 hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash,
937 h->lowcase_key, h->key.len); 934 h->lowcase_key, h->key.len);
938 935