<span class="gmail_quote"></span>Hi Stefano,<br><br>>
so how would you patch klone?<br>>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 "request_parse_urlencoded_data" function.<br>
When the GET and POST variables have the same name, the POST variables are ignored because the "vars_add_urlvar" function doesn't add two variables with the same name (it's normal).<br><br>To distinguish GET and POST methods, I could process as<br>
<br>The "struct request_s", defined in request.c, should have two fields<br>==========================<br> vars_t *getargs; /* get args */<br> vars_t *postargs; /* 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> dbg_return_if (rq == NULL, NULL);<br> return rq-><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> var_t *v;<br> dbg_return_if (rq == NULL, NULL);<br> dbg_return_if (name == NULL, NULL);<br>
v = vars_get(rq-><span style="font-weight: bold;">getargs</span>, name);<br> return v ? var_get_value(v): NULL;<br>}<br>==========================<br>idem for POST.<br><br>The "request_parse_urlencoded_data" function should memorize the GET variables in "getargs" and the POST variables in "postargs" in the "struct request_s" 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 "#define".<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>