[hunchentoot-devel] 404 (page not found) leads to 500 (internal server error)

Sebastian Tennant sebyte at smolny.plus.com
Sun Mar 31 09:07:53 UTC 2013


Hi Hans,

While investigating the effect of subclassing ACCEPTOR-STATUS-MESSAGE, I came
across this behaviour:

 CL-USER> (load "srv.lisp")

 The value 404 is not of type SEQUENCE.
   [Condition of type TYPE-ERROR]

--8<---------------cut here---------------start------------->8---
;;; srv.lisp

(in-package "CL-USER")

(asdf:load-system :hunchentoot)
(asdf:load-system :drakma)

(setq tbnl:*catch-errors-p* nil)

(tbnl:start (make-instance
             'tbnl:acceptor
             :document-root nil
             :error-template-directory nil
             :address "127.0.0.1"
             :port 50000))

(write (drakma:http-request "http://127.0.0.1:50000"))
--8<---------------cut here---------------end--------------->8---

I've set TBNL:*CATCH-ERRORS-P* to NIL so that you drop into the debugger.  This
shows that the call (START-OUTPUT 404 ...) results in a (LENGTH 404) call,
which is what fails, but it's not obvious (at least not to me) where this
LENGTH call is coming from.

Sebastian
-- 
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: srv.lisp
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20130331/6f8fa7a4/attachment.ksh>


More information about the Tbnl-devel mailing list