# HG changeset patch # User Adam Chlipala # Date 1216754554 14400 # Node ID b1b33f7cf55554ee53ef2171a28405dd94025417 # Parent f0d3402184d114c973bccde7966a37e1e46c833a Fix GET parsing for inputs without = diff -r f0d3402184d1 -r b1b33f7cf555 src/c/driver.c --- a/src/c/driver.c Tue Jul 22 15:12:20 2008 -0400 +++ b/src/c/driver.c Tue Jul 22 15:22:34 2008 -0400 @@ -122,22 +122,17 @@ 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; + else lw_set_input(ctx, name, ""); - } - else { - inputs = strchr(value, 0); - lw_set_input(ctx, name, ""); - } } }