[hunchentoot-devel] Problem with (setf (hunchentoot:reply-external-format*) ...)
Raymond Wiker
rwiker at gmail.com
Tue Jan 10 14:27:21 UTC 2012
Update: I checked the value of
hunchentoot:*hunchentoot-default-external-format*, which gave me a
hint that I needed to pass something else than just a keyword
symbol...
(setf (hunchentoot:reply-external-format*)
(flexi-streams:make-external-format :utf-8))
appears to work.
In case it matters: this is using Lispworks 6.0.1 (Professional,
32-bit) under Windows 7.
On Tue, Jan 10, 2012 at 3:24 PM, Raymond Wiker <rwiker at gmail.com> wrote:
> I have (finally!) updated my local installation of hunchentoot.
> Testing indicates that things work as expected, except for one thing:
> calling
> (setf (hunchentoot:reply-external-format*) ...) in a request handler
> causes the request to abort. This is probably not a big issue, since I
> probably don't need to set the external format (it appears to get the
> right value automatically).
>
> I'm reporting it here because it may actually be caused by a bug;
> alternatively, it could be that I'm doing something stupid, which
> would then be useful to know.
>
> The code snippet below works (after making an easy-acceptor). Removing
> the #+nil causes it to break.
>
> (hunchentoot:define-easy-handler
> (test :uri "/test")
> (foo)
> (setf (hunchentoot:content-type*) "text/plain")
> #+nil (setf (hunchentoot:reply-external-format*) :utf-8)
> (format nil "Host: ~a~%Proto: ~a (~a)~%Script: ~a~%requrl: ~a~%foo: ~a"
> (hunchentoot:host)
> (hunchentoot:server-protocol*)
> (type-of (hunchentoot:server-protocol*))
> (hunchentoot:script-name*)
> (hunchentoot:request-uri*)
> foo))
More information about the Tbnl-devel
mailing list