aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-04-22 12:23:52 +0100
committerChristopher Baines <mail@cbaines.net>2023-04-22 12:23:52 +0100
commitd1324285bbbd15f9d8199c6674d0d38c35e381b0 (patch)
treec592b4577b9774ccae822dbb753b358c1c55341d
parent96789bbc8a8891f21d9aa0a01ef7f3fc464ab254 (diff)
downloadbffe-d1324285bbbd15f9d8199c6674d0d38c35e381b0.tar
bffe-d1324285bbbd15f9d8199c6674d0d38c35e381b0.tar.gz
Further fix /events with no query parameters
-rw-r--r--bffe/server.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/bffe/server.scm b/bffe/server.scm
index b435476..7da2991 100644
--- a/bffe/server.scm
+++ b/bffe/server.scm
@@ -348,12 +348,14 @@
(('GET "events")
(let ((headers (request-headers request))
(query-parameters
- (let lp ((lst (and=> (uri-query (request-uri request))
+ (let lp ((lst
+ (or (and=> (uri-query (request-uri request))
(lambda (query)
(map uri-decode
(string-split
query
- (char-set #\& #\=)))))))
+ (char-set #\& #\=)))))
+ '())))
(match lst
((key value . rest)
(cons (cons key value) (lp rest)))