diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-09 10:17:29 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-09 10:17:29 +0200 |
commit | fb04413bfce4f910509ba0cce60dea124b0f1a16 (patch) | |
tree | abf2ef0850692d1d9657adbd2bf64a20a736e97d /module/server/macro.scm | |
parent | Dynamicaly created popups now work. (diff) | |
download | calp-fb04413bfce4f910509ba0cce60dea124b0f1a16.tar.gz calp-fb04413bfce4f910509ba0cce60dea124b0f1a16.tar.xz |
Can create events with åäö again.
Diffstat (limited to 'module/server/macro.scm')
-rw-r--r-- | module/server/macro.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/module/server/macro.scm b/module/server/macro.scm index ba70a484..99272a75 100644 --- a/module/server/macro.scm +++ b/module/server/macro.scm @@ -87,8 +87,13 @@ (append (parse-query r:query) - (when (memv 'application/x-www-form-urlencoded - (or (assoc-ref r:headers 'content-type) '())) - (parse-query (uri-decode (bytevector->string body "UTF-8"))))))))) + (let ((content-type (assoc-ref r:headers 'content-type))) + (when content-type + (let ((type (car content-type)) + (args (cdr content-type))) + (when (eq? type 'application/x-www-form-urlencoded) + (let ((encoding (or (assoc-ref args 'encoding) "UTF-8"))) + (parse-query (bytevector->string body encoding) + encoding))))))))))) (lambda* (a b #:optional new-state) (values a b (or new-state state)))))))) |