From 54294366d5fe47aba687fc791967596e31a26864 Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Wed, 22 Sep 2010 22:20:50 +0200 Subject: rewind_input_plugin: Update MIME not only once The assumption that MIME type is set only once is not valid with CURL, as URL redirections may update the MIME type. This fixes bug #3044. --- src/input/rewind_input_plugin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c index 0a874a29c..335ccf7e1 100644 --- a/src/input/rewind_input_plugin.c +++ b/src/input/rewind_input_plugin.c @@ -86,10 +86,11 @@ copy_attributes(struct input_stream *dest) dest->size = src->size; dest->offset = src->offset; - if (dest->mime == NULL && src->mime != NULL) - /* this is set only once, and the duplicated pointer - is freed by input_stream_close() */ + if (src->mime != NULL) { + if (dest->mime != NULL) + g_free(dest->mime); dest->mime = g_strdup(src->mime); + } } static void -- cgit v1.2.3