From 5c7f891b41d67d80b2b23d6cf31767331869ffa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Thu, 17 Apr 2008 20:55:59 +0000 Subject: [PATCH] Allow duplicates in the HTTP argument parser, it is needed for list transfers from prototype. --- http.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/http.c b/http.c index 85e612aa..44b43c7f 100644 --- a/http.c +++ b/http.c @@ -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); }