[hunchentoot-devel] Problem with (setf (hunchentoot:reply-external-format*) ...)

Hans Hübner hans.huebner at gmail.com
Tue Jan 10 14:34:01 UTC 2012


Hello Raymond,

can you let us know what you mean by "abort".  An error message and
backtrace would be most helpful.

Thanks,
Hans

On Tue, Jan 10, 2012 at 3:27 PM, Raymond Wiker <rwiker at gmail.com> wrote:
> 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))
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel




More information about the Tbnl-devel mailing list