input_curl: set input_stream.mime from Content-Type response header

This commit is contained in:
Max Kellermann 2008-10-26 21:19:32 +01:00
parent 1437a56a11
commit 5d9ef0cd83

View File

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