Commit 54294366 authored by Thomas Jansen's avatar Thomas Jansen Committed by Max Kellermann

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.
parent 4a7abc9d
...@@ -2,6 +2,8 @@ ver 0.15.13 (2010/??/??) ...@@ -2,6 +2,8 @@ ver 0.15.13 (2010/??/??)
* output_thread: fix race condition after CANCEL command * output_thread: fix race condition after CANCEL command
* output: * output:
- httpd: fix random data in stream title - httpd: fix random data in stream title
* input:
- rewind: update MIME not only once
ver 0.15.12 (2010/07/20) ver 0.15.12 (2010/07/20)
......
...@@ -86,10 +86,11 @@ copy_attributes(struct input_stream *dest) ...@@ -86,10 +86,11 @@ copy_attributes(struct input_stream *dest)
dest->size = src->size; dest->size = src->size;
dest->offset = src->offset; dest->offset = src->offset;
if (dest->mime == NULL && src->mime != NULL) if (src->mime != NULL) {
/* this is set only once, and the duplicated pointer if (dest->mime != NULL)
is freed by input_stream_close() */ g_free(dest->mime);
dest->mime = g_strdup(src->mime); dest->mime = g_strdup(src->mime);
}
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment