Commit 5d9ef0cd authored by Max Kellermann's avatar Max Kellermann

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

parent 1437a56a
......@@ -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;
......
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