]> git.kaiwu.me - nginx.git/commitdiff
Style: use ngx_str_set().
authorTatsuhiko Kubo <cubicdaiya@gmail.com>
Wed, 9 Jul 2014 14:23:59 +0000 (23:23 +0900)
committerTatsuhiko Kubo <cubicdaiya@gmail.com>
Wed, 9 Jul 2014 14:23:59 +0000 (23:23 +0900)
src/http/modules/ngx_http_memcached_module.c

index aaa047e8fb79de0b59877cc3b8378f284a830591..bda038da4519c663cdf5ac3e947a8915048419d2 100644 (file)
@@ -380,11 +380,8 @@ found:
             }
 
             h->hash = 1;
-            h->key.len = sizeof("Content-Encoding") - 1;
-            h->key.data = (u_char *) "Content-Encoding";
-            h->value.len = sizeof("gzip") - 1;
-            h->value.data = (u_char *) "gzip";
-
+            ngx_str_set(&h->key, "Content-Encoding");
+            ngx_str_set(&h->value, "gzip");
             r->headers_out.content_encoding = h;
         }