No one can help me? :(<br><br><div class="gmail_quote">On Sun, May 2, 2010 at 11:37 AM, tianfeng <span dir="ltr">&lt;<a href="mailto:spirittf@gmail.com">spirittf@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m writing a module to add a cookie into r-&gt;headers_in.cookies, that the php-cgi server behind can get it from $_COOKIE. But there&#39;s a problem which I could not resolve.<br><div class="gmail_quote">If there&#39;s no cookie sent from client, I just create a new <i><b>r-&gt;headers_in.cookies.elts</b></i> to store my cookie for php-cgi behind as this:<br>


<i><b>ngx_table_elt_t* cookie = (ngx_table_elt_t*)ngx_pcalloc(r-&gt;pool, sizeof(ngx_table_elt_t));<br>cookie = (ngx_table_elt_t*)ngx_array_push(&amp;r-&gt;headers_in.cookies);</b></i><br>Then I stroe my cookie to <i><b>cookie</b></i>, but the php-cgi can not get cookie from $_COOKIE.<br>


However, if client already has cookie and send them to server, I can modify <i><b>r-&gt;headers_in.cookies.elts</b></i> to add my cookie to it, and the php-cgi behind can get my cookie from $_COOKIE.<br>My module is registed in <i><b>NGX_HTTP_PREACCESS_PHASE</b></i>.<br>


I really don&#39;t know how to resolve it<img goomoji="33A" style="margin: 0pt 0.2ex; vertical-align: middle;" src="cid:33A@goomoji.gmail">. Who can help me? Thank you very much!!<img goomoji="349" style="margin: 0pt 0.2ex; vertical-align: middle;" src="cid:349@goomoji.gmail"><br>


</div><br>
</blockquote></div><br>