Mercurial > audlegacy-plugins
changeset 1226:f15ae221c54c
Add support for mimetypes.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Mon, 09 Jul 2007 05:30:14 -0500 |
parents | 08f28756209c |
children | 7a081f2998d0 |
files | src/curl/curl.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/curl/curl.c Mon Jul 09 05:06:47 2007 -0500 +++ b/src/curl/curl.c Mon Jul 09 05:30:14 2007 -0500 @@ -998,6 +998,14 @@ return g_strdup(handle->title); if (!strcmp(field, "content-length")) return g_strdup_printf("%ld", handle->length); + if (!strcmp(field, "content-type")) + { + char *out = NULL; + curl_easy_getinfo(handle->curl, CURLINFO_CONTENT_TYPE, &out); + + if (out) + return g_strdup(out); + } return NULL; }