|
|
|
@ -46,8 +46,11 @@ httpHeaderAdd(const HttpHeader * root, HttpHeader header) |
|
|
|
HttpHeader * found = tsearch(header, (void **)root, comp); |
|
|
|
|
|
|
|
if (*found != header) { |
|
|
|
(*found)->value = realloc((*found)->value, sizeof(char) * (++(*found)->nvalue)); |
|
|
|
(*found)->value[(*found)->nvalue - 1] = malloc(strlen(header->value) + 1); |
|
|
|
(*found)->value = realloc( |
|
|
|
(*found)->value, |
|
|
|
sizeof(char*) * (++(*found)->nvalue)); |
|
|
|
(*found)->value[(*found)->nvalue - 1] = malloc( |
|
|
|
strlen((header->value)[0]) + 1); |
|
|
|
strcpy(((*found)->value)[(*found)->nvalue - 1], (header->value)[0]); |
|
|
|
delete(&header); |
|
|
|
} |
|
|
|
|