summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-22 15:22:34 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-22 15:22:34 -0400
commitda42860153178241d05f7aaa0ecac39b5982e689 (patch)
tree84f840844d63ef650de1bd8c6aed0e4c227db694 /src/c
parente8ceaa0ae216c7c85e810998ab97989e7a83c82d (diff)
Fix GET parsing for inputs without =
Diffstat (limited to 'src/c')
-rw-r--r--src/c/driver.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/c/driver.c b/src/c/driver.c
index af3bca08..90538104 100644
--- a/src/c/driver.c
+++ b/src/c/driver.c
@@ -122,22 +122,17 @@ static void *worker(void *data) {
while (*inputs) {
name = inputs;
- if (value = strchr(inputs, '=')) {
+ if (inputs = strchr(inputs, '&'))
+ *inputs++ = 0;
+ else
+ inputs = strchr(name, 0);
+
+ if (value = strchr(name, '=')) {
*value++ = 0;
- if (inputs = strchr(value, '&'))
- *inputs++ = 0;
- else
- inputs = strchr(value, 0);
lw_set_input(ctx, name, value);
}
- else if (inputs = strchr(value, '&')) {
- *inputs++ = 0;
- lw_set_input(ctx, name, "");
- }
- else {
- inputs = strchr(value, 0);
+ else
lw_set_input(ctx, name, "");
- }
}
}