input_curl: set input_stream.mime from Content-Type response header
This commit is contained in:
parent
1437a56a11
commit
5d9ef0cd83
@ -316,6 +316,9 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
buffer[end - value] = 0;
|
buffer[end - value] = 0;
|
||||||
|
|
||||||
is->size = is->offset + g_ascii_strtoull(buffer, NULL, 10);
|
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;
|
return size;
|
||||||
|
Loading…
Reference in New Issue
Block a user