2 #include "http_config.h"
4 #include "http_protocol.h"
5 #include "apr_compat.h"
6 #include "apr_strings.h"
8 #include "string_array.h"
11 #ifndef APACHE_TOOLS_H
12 #define APACHE_TOOLS_H
15 /* parses apache URL params (GET and POST).
16 Returns a string_array of the form [ key, val, key, val, ...]
17 Returns NULL if there are no params */
18 string_array* apacheParseParms(request_rec* r);
20 /* provide the params string array, and this will generate a
21 string of array of param keys
22 the returned string_array most be freed by the caller
24 string_array* apacheGetParamKeys(string_array* params);
26 /* provide the params string array and a key name, and
27 this will provide the value found for that key
28 the returned string_array most be freed by the caller
30 string_array* apacheGetParamValues(string_array* params, char* key);
32 /* returns the first value found for the given param.
33 char* must be freed by the caller */
34 char* apacheGetFirstParamValue(string_array* params, char* key);