branch: master commit dbea9790d30ff1c2e80585e9441d45ed0b740e30 Author: Ludovic Courtès <l...@gnu.org> Date: Thu Mar 1 15:37:29 2018 +0100
http: Fix interpretation of non-numerical parameters. Fixes a regression introduced in 593cb7be108ed97bca5371aad2e53fa8ce4817ba. * src/cuirass/http.scm (request-parameters): Fix fallback case in 'match' form. Previously it would return a procedure in this case, as returned by (const param), leading to a failure down the road in 'sqlite-bind-arguments' as could be seen by running tests/http.scm. --- src/cuirass/http.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index b8738cf..59e4ce1 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -84,10 +84,11 @@ (match (string-split param #\=) ((key param) (let ((key-symbol (string->symbol key))) - (list key-symbol ((match key-symbol - ('id string->number) - ('nr string->number) - (_ const)) param)))))) + (list key-symbol + (match key-symbol + ('id (string->number param)) + ('nr (string->number param)) + (_ param))))))) (string-split query #\&)))))