| 46 | }; |
| 47 | |
| 48 | static struct string_list *get_parameters(void) |
| 49 | { |
| 50 | if (!query_params) { |
| 51 | const char *query = getenv("QUERY_STRING"); |
| 52 | |
| 53 | CALLOC_ARRAY(query_params, 1); |
| 54 | while (query && *query) { |
| 55 | char *name = url_decode_parameter_name(&query); |
| 56 | char *value = url_decode_parameter_value(&query); |
| 57 | struct string_list_item *i; |
| 58 | |
| 59 | i = string_list_lookup(query_params, name); |
| 60 | if (!i) |
| 61 | i = string_list_insert(query_params, name); |
| 62 | else |
| 63 | free(i->util); |
| 64 | i->util = value; |
| 65 | } |
| 66 | } |
| 67 | return query_params; |
| 68 | } |
| 69 | |
| 70 | static const char *get_parameter(const char *name) |
| 71 | { |
no test coverage detected