[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Danny Milosavljevic |
Date: |
Mon, 19 Feb 2018 17:02:24 -0500 (EST) |
branch: master
commit 593cb7be108ed97bca5371aad2e53fa8ce4817ba
Author: Danny Milosavljevic <address@hidden>
Date: Mon Feb 19 22:33:28 2018 +0100
http: Interpret id and nr request-parameters as numbers.
* src/cuirass/http.scm (request-parameters): Interpret id and nr parameters
as
numbers.
---
src/cuirass/http.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 3f49369..b8738cf 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -83,7 +83,11 @@
(map (lambda (param)
(match (string-split param #\=)
((key param)
- (list (string->symbol key) param))))
+ (let ((key-symbol (string->symbol key)))
+ (list key-symbol ((match key-symbol
+ ('id string->number)
+ ('nr string->number)
+ (_ const)) param))))))
(string-split query #\&)))))