mirror of
https://github.com/vale981/lack
synced 2025-03-04 17:01:41 -05:00
Add default headers to ENV generate-env returns.
This commit is contained in:
parent
07fb0fc836
commit
d6815bb8ff
1 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,8 @@
|
|||
(in-package :lack.test)
|
||||
|
||||
(defun generate-env (uri &key (method :get) content headers cookies)
|
||||
;; default headers
|
||||
(setf headers (append '(("host" . "localhost") ("accept" . "*/*")) headers))
|
||||
(when content
|
||||
(let ((content-type (or (cdr (assoc "content-type" headers :test #'string-equal))
|
||||
(if (find-if #'pathnamep content :key #'cdr)
|
||||
|
|
Loading…
Add table
Reference in a new issue