<meta http-equiv="content-type" content="text/html; charset=utf-8">Thanks for the prompt reply.<div><br></div><div>That makes it a lot clearer, is hash = 1 used to indicate that the lowcase_key isnt initialized (meaning you shouldnt try to look it up the headers_in_hash) or any other value like 0 is also used?</div>
<div>I basically need the lowcase headers, I am just reusing the key, am I good with just checking for 1 or should I do something else? [I want to use the available value instead of re-evaluating]</div><div><br></div><div>
Thanks again...</div><div><div><br><div class="gmail_quote">On Wed, Nov 23, 2011 at 10:10 PM, Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru">igor@sysoev.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="HOEnZb"><div class="h5">On Wed, Nov 23, 2011 at 10:04:06PM +0530, Fasih wrote:<br>
> Hi<br>
><br>
> I have a plugin that uses request.headers_out.headers, I use the<br>
> lowcase_key of the element for something. However, recently while debugging<br>
> a crash I noticed that the lowcase_key isnt always initialized<br>
> [e.g. src/http/modules/ngx_http_userid_filter_module.c:424,<br>
> set_cookie->lowcase_key isnt set(nor initialized)] I would have taken that<br>
> as a bug but noticed that there are other places<br>
> [src/http/modules/ngx_http_headers_filter_module.c] where lowcase_key isnt<br>
> initialized. However, in all the three instances, header.hash is<br>
> initialized to 1.<br>
><br>
> So, the question is:<br>
> 1. Does hash = 1 necessarily imply that lowcase_key isnt initialized?<br>
> 2. Should lowcase_key have been initialized and this is a bug [in which<br>
> case I can walk through the code and submit a patch]<br>
> 3. Why is this done?<br>
<br>
</div></div>lowcase_key is used in r->headers_in only to find them in headers_in_hash.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>+Fasih<br><br><i>Wisdom doesn't automatically come with old age. Nothing does - except
wrinkles. It's true, some wines improve with age. But only if the
grapes were good in the first place</i><br><br>
</div></div>