Allow 'content' of types other than alist in lack.test:generate-env.

This commit is contained in:
Eitaro Fukamachi 2018-09-19 22:53:39 +09:00
parent 17756b63fd
commit 4fac568329

View file

@ -50,9 +50,15 @@
(format s "~A=~A" (caar cookies) (cdar cookies))
(loop for (k . v) in (cdr cookies)
do (format s "; ~A=~A" k v))))))))
(when content
(setf content (flex:string-to-octets
(quri:url-encode-params content))))
(setf content
(etypecase content
(cons (flex:string-to-octets
(quri:url-encode-params content)
:external-format :utf-8))
(string (flex:string-to-octets content
:external-format :utf-8))
(array content)
(null nil)))
(list :request-method method
;; Seems that all Clack handlers put into this field
;; only pathname with GET parameters