fukamachi / lack

Lack, the core of Clack
MIT License
156 stars 33 forks source link

Integrate cl-cookie? #88

Open kilianmh opened 5 months ago

kilianmh commented 5 months ago

Should we allow response:set-cookies slot in lack/response to be a instance of cl-cookie:cookie / cookie-jar? Then we could reuse cl-cookie:write-set-cookie-header for encoding the cookie-string.

fukamachi commented 5 months ago

It sounds reasonable. Although I like Lack to be minimal, there's not much sense to reimplement it in Lack.

kilianmh commented 5 months ago

Should response:set-cookies be allowed to be of type cl-cookie:cookie-jar and cl-cookie:cookie, or only of the two?

Side note: Is there any specific reason, why to not allow (list of) cookie-strings as response:set-cookies value? See fukamachi/ningle#43

fukamachi commented 5 months ago

It's not required, but it's better to accept Common Lisp objects other than cl-cookie's objects if it doesn't make much trouble.

Side note: Is there any specific reason, why to not allow (list of) cookie-strings as response:set-cookies value? See https://github.com/fukamachi/ningle/issues/43

No, I don't even remember the reason. I think an association list or hash table suits it.