From fb04413bfce4f910509ba0cce60dea124b0f1a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 9 Aug 2020 10:17:29 +0200 Subject: =?UTF-8?q?Can=20create=20events=20with=20=C3=A5=C3=A4=C3=B6=20aga?= =?UTF-8?q?in.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/server/util.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/server/util.scm') diff --git a/module/server/util.scm b/module/server/util.scm index ada4f266..58a11ec3 100644 --- a/module/server/util.scm +++ b/module/server/util.scm @@ -4,14 +4,14 @@ :use-module (web uri)) -(define-public (parse-query query-string) +(define*-public (parse-query query-string optional: (encoding "UTF-8")) (unless (or (not query-string) (string-null? query-string)) (fold (lambda (str list) ;; only split on the first equal. ;; Does HTTP allow multiple equal signs in a data field? ;; NOTE that this fails if str lacks an equal sign. (define idx (string-index str #\=)) - (define key (uri-decode (substring str 0 idx))) - (define val (uri-decode (substring str (1+ idx)))) + (define key (uri-decode (substring str 0 idx) encoding: encoding)) + (define val (uri-decode (substring str (1+ idx)) encoding: encoding)) (cons* (-> key string->symbol symbol->keyword) val list)) '() (string-split query-string #\&)))) -- cgit v1.2.3