# HG changeset patch # User William Pitcock # Date 1183977014 18000 # Node ID f15ae221c54c5fe2cbaa4a9ad082d75aba535eb4 # Parent 08f28756209cd4b7ace16d7c1d17b73b785927d2 Add support for mimetypes. diff -r 08f28756209c -r f15ae221c54c src/curl/curl.c --- 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; }