summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorminfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68>2013-05-07 20:52:42 +0000
committerminfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68>2013-05-07 20:52:42 +0000
commit3cad109fc7f7ea5c6b2f5836ea3a4415f8fd423e (patch)
treec028cbae193437f31e4251dec64a582a722218f6 /include
parentbbaf6450f8e743f6d438e412fc1259a5d6b58718 (diff)
downloadlibapr-3cad109fc7f7ea5c6b2f5836ea3a4415f8fd423e.tar.gz
Backport r1480067 to v1.5 branch.
Add the apr_table_getm() call, which transparently handles the merging of keys with multiple values. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1480071 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr_tables.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/apr_tables.h b/include/apr_tables.h
index 1e7a57d16..00c4d8d2c 100644
--- a/include/apr_tables.h
+++ b/include/apr_tables.h
@@ -268,6 +268,18 @@ APR_DECLARE(void) apr_table_clear(apr_table_t *t);
APR_DECLARE(const char *) apr_table_get(const apr_table_t *t, const char *key);
/**
+ * Get values associated with a given key from the table. If more than one
+ * value exists, return a comma separated list of values. After this call, the
+ * data is still in the table.
+ * @param p The pool to allocate the combined value from, if necessary
+ * @param t The table to search for the key
+ * @param key The key to search for (case does not matter)
+ * @return The value associated with the key, or NULL if the key does not exist.
+ */
+APR_DECLARE(const char *) apr_table_getm(apr_pool_t *p, const apr_table_t *t,
+ const char *key);
+
+/**
* Add a key/value pair to a table. If another element already exists with the
* same key, this will overwrite the old data.
* @param t The table to add the data to.