Ruediger Pluem wrote:

On 12/05/2008 08:15 AM, [EMAIL PROTECTED] wrote:
Author: pquerna
Date: Thu Dec  4 23:15:22 2008
New Revision: 723627

URL: http://svn.apache.org/viewvc?rev=723627&view=rev
Log:
Add new api, ap_args_to_table, to parse a request's arguments into a table.
....                                   void *getsfunc_data);
+AP_DECLARE(void) ap_args_to_table(request_rec *r, apr_table_t **table);
+

Hm. This requires a minor bump.

Bumped r724083.

...
+static void
+argstr_to_table(apr_pool_t *p, char *str, apr_table_t *parms)
+{
+    char *key;
+    char *value;
+    char *strtok_state;
+

Hm, we should make a copy of str before changing it in the while lopp
below.

Yah, fixed in r724080.

+    key = apr_strtok(str, "&", &strtok_state);
+    while (key) {
+        value = strchr(key, '=');
+        if (value) {
+            *value = '\0';      /* Split the string in two */
+            value++;            /* Skip passed the = */
+        }
+        else {
+            value = "1";
+        }
+        ap_unescape_url(key);
+        ap_unescape_url(value);
+        apr_table_set(parms, key, value);
+        /*
+         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,

r is no parameter for this function.


Removed this old commented out block in r724084.

Thanks,
Paul

Reply via email to