From 7e922c290f8ab3a4f72608da661428f573459e39 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 21 Mar 2004 21:32:15 +0000 Subject: [project @ 2004-03-21 21:32:15 by jmb] Fix for SparkFS causing problems with uploading zip files. Map filetypes to mimetype properly. svn path=/import/netsurf/; revision=646 --- content/fetch.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'content/fetch.c') diff --git a/content/fetch.c b/content/fetch.c index d42489694..8ab31c92c 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -676,13 +676,18 @@ bool fetch_process_headers(struct fetch *f) struct HttpPost *fetch_post_convert(struct form_successful_control *control) { struct HttpPost *post = 0, *last = 0; + char *mimetype = 0; for (; control; control = control->next) { if (control->file) { + mimetype = fetch_mimetype(control->value); curl_formadd(&post, &last, CURLFORM_COPYNAME, control->name, CURLFORM_FILE, control->value, + CURLFORM_CONTENTTYPE, + (mimetype != 0 ? mimetype : "text/plain"), CURLFORM_END); + xfree(mimetype); } else { curl_formadd(&post, &last, -- cgit v1.2.3