summaryrefslogtreecommitdiff
path: root/sys/src/cmd/mothra/forms.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-05-25 10:52:10 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-05-25 10:52:10 +0200
commitefc0780d866ae0590621b0d50bc413a517043bcd (patch)
tree9cc7a059f2edeef42bdfabe87d2055ce65a5acfd /sys/src/cmd/mothra/forms.c
parent9f150d42a3019a16546b8f1a6ed029ee6d67f492 (diff)
mothra: changes toward multipart/formdata
Diffstat (limited to 'sys/src/cmd/mothra/forms.c')
-rw-r--r--sys/src/cmd/mothra/forms.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/src/cmd/mothra/forms.c b/sys/src/cmd/mothra/forms.c
index febf1e8d3..b6b4f60d8 100644
--- a/sys/src/cmd/mothra/forms.c
+++ b/sys/src/cmd/mothra/forms.c
@@ -612,11 +612,15 @@ void h_submitinput(Panel *p, int){
}
if(form->method==GET){
if(debug)fprint(2, "GET %s\n", buf);
- geturl(buf, GET, 0, 0, 0);
+ geturl(buf, -1, 0, 0);
}
else{
+ int post;
+
if(debug)fprint(2, "POST %s: %s\n", form->action, buf);
- geturl(form->action, POST, buf, 0, 0);
+ if((post = urlpost(selurl(form->action), nil)) >= 0)
+ write(post, buf, strlen(buf));
+ geturl(form->action, post, 0, 0);
}
free(buf);
}