diff options
author | Max Kellermann <max@duempel.org> | 2008-10-26 21:19:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-26 21:19:32 +0100 |
commit | 5d9ef0cd8353a049be6aaf838f0f3d89fd93d966 (patch) | |
tree | 7b80df0343e023157afeb5afbaf8f1272664488a /src/input_curl.c | |
parent | 1437a56a11d15d703599d005bf37e8351403dc68 (diff) | |
download | mpd-5d9ef0cd8353a049be6aaf838f0f3d89fd93d966.tar.gz mpd-5d9ef0cd8353a049be6aaf838f0f3d89fd93d966.tar.xz mpd-5d9ef0cd8353a049be6aaf838f0f3d89fd93d966.zip |
input_curl: set input_stream.mime from Content-Type response header
Diffstat (limited to 'src/input_curl.c')
-rw-r--r-- | src/input_curl.c | 3 |
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; |