<span class="gmail_quote"></span>Hi Stefano,<br><br>&gt; 
so how would you patch klone?<br>&gt;adding two *distinct* arrays holding GET and POST variables indipendently?<br>I think that the existing way must be preserved.<br>The current way concatenates the GET and POST variables with the &quot;request_parse_urlencoded_data&quot; function.<br>

When the GET and POST variables have the same name, the POST variables are ignored because the &quot;vars_add_urlvar&quot; function doesn&#39;t add two variables with the same name (it&#39;s normal).<br><br>To distinguish GET and POST methods, I could process as<br>

<br>The &quot;struct request_s&quot;, defined in request.c, should have two fields<br>==========================<br>&nbsp;&nbsp; vars_t *getargs;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* get args */<br>&nbsp;&nbsp; vars_t *postargs;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* post args */<br>==========================<br clear="all">

<br><br>This C file could have the next methods :<br>==========================<br>vars_t *request_get_<span style="font-weight: bold;">getargs</span>(request_t *rq)<br>{<br>&nbsp;&nbsp;&nbsp; dbg_return_if (rq == NULL, NULL);<br>&nbsp;&nbsp;&nbsp; return rq-&gt;<span style="font-weight: bold;">getargs</span>;<br>

}<br><br>const char *request_get_<span style="font-weight: bold;">getarg</span>(request_t *rq, const char *name)<br>{<br>&nbsp;&nbsp;&nbsp; var_t *v;<br>&nbsp; &nbsp; dbg_return_if (rq == NULL, NULL);<br>&nbsp;&nbsp;&nbsp; dbg_return_if (name == NULL, NULL);<br>

&nbsp; &nbsp; v = vars_get(rq-&gt;<span style="font-weight: bold;">getargs</span>, name);<br>&nbsp; &nbsp; return v ? var_get_value(v): NULL;<br>}<br>==========================<br>idem for POST.<br><br>The &quot;request_parse_urlencoded_data&quot; function should memorize the GET variables in &quot;getargs&quot; and the POST variables in &quot;postargs&quot; in the &quot;struct request_s&quot; before the concatenation between GET and POST variables.<br>

<br>This feature could be desactivate to the compilation with the presence or not of a &quot;#define&quot;.<br><br>Thank you.<br><span class="sg"><br>-- <br>Mickaël AUGER<br><a href="mailto:mickael.auger@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mickael.auger@gmail.com</a>
</span><br>