From 33f94c265e34c6ec2a9c0603f814deda47f77849 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 4 Jan 2014 21:49:03 +0000 Subject: [PATCH] Support cloning rawfile data --- content/fetch.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/fetch.c b/content/fetch.c index 5b9aba1b0..a9a9049f2 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -639,6 +639,21 @@ struct fetch_multipart_data *fetch_multipart_data_clone( return NULL; } + if (clone->file) { + clone->rawfile = strdup(list->rawfile); + if (clone->rawfile == NULL) { + free(clone->value); + free(clone->name); + free(clone); + if (result != NULL) + fetch_multipart_data_destroy(result); + + return NULL; + } + } else { + clone->rawfile = NULL; + } + clone->next = NULL; if (result == NULL)