Bug in request.headers_out initialization?

Fasih faskiri.devel at gmail.com
Wed Nov 23 16:34:06 UTC 2011


Hi

I have a plugin that uses request.headers_out.headers, I use the
lowcase_key of the element for something. However, recently while debugging
a crash I noticed that the lowcase_key isnt always initialized
[e.g.  src/http/modules/ngx_http_userid_filter_module.c:424,
set_cookie->lowcase_key isnt set(nor initialized)] I would have taken that
as a bug but noticed that there are other places
[src/http/modules/ngx_http_headers_filter_module.c] where lowcase_key isnt
initialized. However, in all the three instances, header.hash is
initialized to 1.

So, the question is:
1. Does hash = 1 necessarily imply that lowcase_key isnt initialized?
2. Should lowcase_key have been initialized and this is a bug [in which
case I can walk through the code and submit a patch]
3. Why is this done?

Best regards
+Fasih
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20111123/9f90dedc/attachment.html>


More information about the nginx-devel mailing list