diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-21 21:32:15 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-21 21:32:15 +0000 |
commit | 7e922c290f8ab3a4f72608da661428f573459e39 (patch) | |
tree | 634ba4c2cca135353c35bd29ac94691717551f1e /content/fetch.c | |
parent | 3aeafecd7b547e3f535fb5a700fc20e590dab967 (diff) | |
download | netsurf-7e922c290f8ab3a4f72608da661428f573459e39.tar.gz netsurf-7e922c290f8ab3a4f72608da661428f573459e39.tar.bz2 |
[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
Diffstat (limited to 'content/fetch.c')
-rw-r--r-- | content/fetch.c | 5 |
1 files changed, 5 insertions, 0 deletions
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, |