Allow duplicates in the HTTP argument parser, it is needed for list transfers from prototype.

This commit is contained in:
Andreas Öman 2008-04-17 20:55:59 +00:00
parent 0f86ee679c
commit 5c7f891b41

14
http.c
View file

@ -777,17 +777,9 @@ http_arg_set(struct http_arg_list *list, char *key, char *val)
{
http_arg_t *ra;
TAILQ_FOREACH(ra, list, link)
if(!strcasecmp(ra->key, key))
break;
if(ra == NULL) {
ra = malloc(sizeof(http_arg_t));
TAILQ_INSERT_TAIL(list, ra, link);
ra->key = strdup(key);
} else {
free(ra->val);
}
ra = malloc(sizeof(http_arg_t));
TAILQ_INSERT_TAIL(list, ra, link);
ra->key = strdup(key);
ra->val = strdup(val);
}