From 2aa6bca29e6a2782a789cdf6fc2cfdfbcb06a628 Mon Sep 17 00:00:00 2001 From: Coin Okay Date: Fri, 24 Apr 2020 18:40:48 -0500 Subject: application/x-www-form-urlencoded decoder --- decoders.lisp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'decoders.lisp') diff --git a/decoders.lisp b/decoders.lisp index d6bb7d6..9878b44 100644 --- a/decoders.lisp +++ b/decoders.lisp @@ -114,7 +114,6 @@ becomes (:content-disposition (:name \"file\" :filename \"mypic.png\"))") (<> (read-body-to-string stream content-length) + (split-sequence #\&) + (mapcar (lambda (s) (split-sequence #\= s))) + (as->* pairs + (loop + :for (key undecoded) :in pairs + :appending (list (make-keyword key) + (urldecode undecoded :queryp t)))))) + +(add-decoder "application/x-www-form-urlencoded" #'decode-application/x-www-form-urlencoded) -- cgit v1.2.3