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

Raymond Wiker rwiker at gmail.com
Tue Jan 10 14:24:47 UTC 2012


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