小编jac*_*cal的帖子

hunchentoot使用ssl定义易于处理?

我一直在使用define-easy-handler。我现在有一个刚铸造的ssl证书和相关的pem文件,但无法弄清楚deh的ssl等效项是什么。

例如,我有:

  (hunchentoot:define-easy-handler 
   (login :uri "/login") 
   () 
   (login-html)) 
Run Code Online (Sandbox Code Playgroud)

这只是一个简单的形式,其形式如下:

(hunchentoot:define-easy-handler 
   (dologin :uri "/dologin") 
   (email password) 
   (dologin-html email password)) 
Run Code Online (Sandbox Code Playgroud)

.pem从freecert 获得了所需的文件,因此我认为我拥有以下文件:SSL-CERTIFICATE-FILE和:SSL-PRIVATEKEY-FILE。我已经对上面的各种args进行了尝试,但是似乎无法正常工作。有人可以给我举个例子吗?

预先感谢您的帮助!

ssl common-lisp hunchentoot

4
推荐指数
1
解决办法
252
查看次数

cl-who 在 funcall 中传递流

我正在使用 cl-who (通过 hunchentoot),到目前为止完全成功,但有一件事我无法弄清楚,而且我的解决方法很丑陋,所以我希望有一个简单的解决方案。我的 hunchentoot 简单处理程序调用的函数如下所示:

(defun foo ()
 (with-html-output-to-string
   (*standard-output* nil :prologue t)
   (:html
    (:body (htm :br :hr "foo" :hr ...etc...))))
Run Code Online (Sandbox Code Playgroud)

一切都很好。

然而,当我想从 foo 中调用辅助函数来执行...无论我想要执行什么子工作时,我不知道如何使 CL-WHO 的 HTM 上下文执行该调用。例如,这工作正常:

(defun foo ()
  (with-html-output-to-string
   (*standard-output* nil :prologue t)
   (:html
    (:body (htm :br :hr "foo" :hr (bar)))))

(defun bar ()
   (format t "This will show up in the html stream"))
Run Code Online (Sandbox Code Playgroud)

但这不起作用:

(defun bar ()
  (with-html-output-to-string
   (*standard-output* nil :prologue t)
   (htm "This will NOT show up in the html stream")))
Run Code Online (Sandbox Code Playgroud)

(我已经尝试过各种操作,但无济于事。)

我确信我正在做一些简单的错误;必须在任何 …

lisp common-lisp hunchentoot cl-who

1
推荐指数
1
解决办法
155
查看次数

标签 统计

common-lisp ×2

hunchentoot ×2

cl-who ×1

lisp ×1

ssl ×1