| 339 | } |
| 340 | |
| 341 | static void tokens_to_array(apr_pool_t *p, const char *data, |
| 342 | apr_array_header_t *arr) |
| 343 | { |
| 344 | char *token; |
| 345 | |
| 346 | while ((token = ap_get_list_item(p, &data)) != NULL) { |
| 347 | *((const char **) apr_array_push(arr)) = token; |
| 348 | } |
| 349 | |
| 350 | /* Sort it so that "Vary: A, B" and "Vary: B, A" are stored the same. */ |
| 351 | qsort((void *) arr->elts, arr->nelts, sizeof(char *), array_alphasort); |
| 352 | } |
| 353 | |
| 354 | /* |
| 355 | * Hook and mod_cache callback functions |
no test coverage detected