diff src/http/ngx_http_variables.c @ 3516:dd1570b6f237

ngx_str_set() and ngx_str_null()
author Igor Sysoev <igor@sysoev.ru>
date Fri, 14 May 2010 09:56:37 +0000
parents 0eb46e3c5c02
children 6802ba529ec4
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1390,8 +1390,7 @@ ngx_http_variable_sent_location(ngx_http
         return NGX_OK;
     }
 
-    name.len = sizeof("sent_http_location") - 1;
-    name.data = (u_char *) "sent_http_location";
+    ngx_str_set(&name, "sent_http_location");
 
     return ngx_http_variable_unknown_header(v, &name,
                                             &r->headers_out.headers.part,