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.
This commit is contained in:
Thomas Jansen
2010-09-22 22:20:50 +02:00
committed by Max Kellermann
parent 4a7abc9d44
commit 54294366d5
2 changed files with 6 additions and 3 deletions

View File

@@ -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