[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can :auth and :cookies be in the same controller?
From: |
Nala Ginrut |
Subject: |
Re: Can :auth and :cookies be in the same controller? |
Date: |
Sun, 24 Jan 2021 04:41:29 +0800 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
This is because the #:cookies was re-inited improperly, I've fixed it.
Please try again.
Best regards.
Mortimer Cladwell writes:
> Hi,
> Seems like no:
>
> -----BEGIN--------Input Form----../plateset/testcset--------------
> <html></body><h1>Test</h1><br><br>
> <form action="/cset" method="post" >
> <label for="submit"></label><input type="submit" value="Submit">
> </form></body></html>
> ----END--------------------------------------------------------------------
>
> -----BEGIN--------Controller------------------
> (post "/cset"
> #:auth `(table person "lnuser" "passwd" "salt" ,my-hmac)
> #:cookies '(names prjid sid lnuser)
> (lambda (rc)
> (let* ((result "sometext")
> (dummy (:cookies-set! rc 'prjid "prjid" result)))
> (view-render "test" (the-environment)))))
> ----END--------------------------------------------------------------------
>
> ----BEGIN-----Output
> page----------------------------------------------------
> <html></body>
> <h1>Test</h1><br><br>
> check cookies
> </body></html>
> ----END----------------------------------------------------------------
>
> If I submit ../plateset/testcset and click the "submit" button I get the
> error:
>
> In app/controllers/plateset.scm:
> 512:33 2 (_ _)
> In artanis/oht.scm:
> 209:8 1 (_ _ _ _)
> In ice-9/boot-9.scm:
> 1669:16 0 (raise-exception _ #:continuable? _)
> Throw to key `artansi-err' with args `(500 #<procedure cget (ckl ck)>
> "Undefined cookie name" prjid)'.
> HTTP 500
> Captured in <artanis/server/ragnarok.scm>
> Threw in procedure handle-request :
> [REASON] Internal ERROR artansi-err (500 #<procedure cget (ckl ck)>
> Undefined cookie name prjid)!
> [SERVER ERROR] Internal error from server-side, rendering a 500 page for
> client ...
>
>
>
> If I comment out #:auth `(table person "lnuser" "passwd" "salt" ,my-hmac)
> and resubmit I can set the cookie.
> Note that when #:auth is active, I am not using it in any way. Seems like
> its presence is the problem.
>
> Any ideas?
> Thanks
> Mortimer
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
signature.asc
Description: PGP signature