summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-03-21 20:07:14 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-03-21 20:07:14 +0000
commit3aeafecd7b547e3f535fb5a700fc20e590dab967 (patch)
tree3a903ee55002a0d5553bfae7d31adbc028b24897 /content
parent423f0f1e7068ba4874435c02e31b054e62ae7966 (diff)
downloadnetsurf-3aeafecd7b547e3f535fb5a700fc20e590dab967.tar.gz
netsurf-3aeafecd7b547e3f535fb5a700fc20e590dab967.tar.bz2
[project @ 2004-03-21 20:07:14 by jmb]
<input type="file" support> Broken in places. svn path=/import/netsurf/; revision=645
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/content/fetch.c b/content/fetch.c
index a191a821c..d42489694 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -678,10 +678,18 @@ struct HttpPost *fetch_post_convert(struct form_successful_control *control)
struct HttpPost *post = 0, *last = 0;
for (; control; control = control->next) {
- curl_formadd(&post, &last,
- CURLFORM_COPYNAME, control->name,
- CURLFORM_COPYCONTENTS, control->value,
- CURLFORM_END);
+ if (control->file) {
+ curl_formadd(&post, &last,
+ CURLFORM_COPYNAME, control->name,
+ CURLFORM_FILE, control->value,
+ CURLFORM_END);
+ }
+ else {
+ curl_formadd(&post, &last,
+ CURLFORM_COPYNAME, control->name,
+ CURLFORM_COPYCONTENTS, control->value,
+ CURLFORM_END);
+ }
}
return post;