5 #include "http_config.h"
7 #include "http_protocol.h"
8 //#include "apr_compat.h"
9 #include "apr_strings.h"
10 #include "apr_reslist.h"
14 #include "opensrf/string_array.h"
15 #include "opensrf/utils.h"
16 #include "opensrf/log.h"
22 #define APACHE_TOOLS_MAX_POST_SIZE 10485760 /* 10 MB */
25 /* parses apache URL params (GET and POST).
26 Returns a osrfStringArray of the form [ key, val, key, val, ...]
27 Returns NULL if there are no params */
28 osrfStringArray* apacheParseParms(request_rec* r);
30 /* provide the params string array, and this will generate a
31 string of array of param keys
32 the returned osrfStringArray most be freed by the caller
34 osrfStringArray* apacheGetParamKeys(osrfStringArray* params);
36 /* provide the params string array and a key name, and
37 this will provide the value found for that key
38 the returned osrfStringArray most be freed by the caller
40 osrfStringArray* apacheGetParamValues(osrfStringArray* params, char* key);
42 /* returns the first value found for the given param.
43 char* must be freed by the caller */
44 char* apacheGetFirstParamValue(osrfStringArray* params, char* key);
46 /* Writes msg to stderr, flushes stderr, and returns 0 */
47 int apacheDebug( char* msg, ... );
49 /* Writes to stderr, flushe stderr, and returns HTTP_INTERNAL_SERVER_ERROR;
51 int apacheError( char* msg, ... );
54 * Creates an apache table* of cookie name / value pairs
57 apr_table_t* apacheParseCookies(request_rec *r);