aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-26 21:19:32 +0100
committerMax Kellermann <max@duempel.org>2008-10-26 21:19:32 +0100
commit5d9ef0cd8353a049be6aaf838f0f3d89fd93d966 (patch)
tree7b80df0343e023157afeb5afbaf8f1272664488a
parent1437a56a11d15d703599d005bf37e8351403dc68 (diff)
downloadmpd-5d9ef0cd8353a049be6aaf838f0f3d89fd93d966.tar.gz
mpd-5d9ef0cd8353a049be6aaf838f0f3d89fd93d966.tar.xz
mpd-5d9ef0cd8353a049be6aaf838f0f3d89fd93d966.zip
input_curl: set input_stream.mime from Content-Type response header
-rw-r--r--src/input_curl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input_curl.c b/src/input_curl.c
index afc8f9377..df9f43517 100644
--- a/src/input_curl.c
+++ b/src/input_curl.c
@@ -316,6 +316,9 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
buffer[end - value] = 0;
is->size = is->offset + g_ascii_strtoull(buffer, NULL, 10);
+ } else if (strcasecmp(name, "content-type") == 0) {
+ g_free(is->mime);
+ is->mime = g_strndup(value, end - value);
}
return size;