Welcome! Log In Create A New Profile

Advanced

[PATCH 3 of 3] Style: use ngx_str_set()

July 09, 2014 10:32AM
# HG changeset patch
# User Tatsuhiko Kubo <cubicdaiya@gmail.com>
# Date 1404915839 -32400
# Wed Jul 09 23:23:59 2014 +0900
# Node ID d80543940f9a33b262d05864a30ab8b22e906455
# Parent f166c521b619dab231b15e60cec47dd81f52833e
Style: use ngx_str_set().

diff -r f166c521b619 -r d80543940f9a src/http/modules/ngx_http_memcached_module.c
--- a/src/http/modules/ngx_http_memcached_module.c Wed Jul 09 23:22:14 2014 +0900
+++ b/src/http/modules/ngx_http_memcached_module.c Wed Jul 09 23:23:59 2014 +0900
@@ -380,11 +380,8 @@
}

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;
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 3] Style: use ngx_strlen() instead of strlen()

cubicdaiya 1404 July 09, 2014 10:32AM

[PATCH 3 of 3] Style: use ngx_str_set()

cubicdaiya 474 July 09, 2014 10:32AM

Re: [PATCH 3 of 3] Style: use ngx_str_set()

Maxim Dounin 341 July 09, 2014 11:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 205
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready