[hunchentoot-devel] Does hunchentoot-cgi still work with the new hunchentoot ?

z_axis z_axis at 163.com
Thu Dec 22 23:31:36 UTC 2011


I want to use hunchentoot to host a python CGI application.  By searching,  
i found hunchentoot-cgi which exports a function called  
"create-cgi-dispatcher-and-handler".

(defun create-cgi-dispatcher-and-handler (uri-prefix base-path &optional  
content-type)
;...
)

I have tried:
(pushnew (hunchentoot-cgi::create-cgi-dispatcher-and-handler
           "/cgi-bin/"
           "/"
           )
          *dispatch-table* :test #'equal)

When visiting http://127.0.0.1:8000/cgi-bin/nay.py, hunchentoot reports:
Internal Server Error
  An error occured while processing your /cgi-bin/nay.py request.
Error Message
attempt to THROW to a tag that does not exist:  
HUNCHENTOOT-CGI::HANDLER-DONE
Backtrace
0: (SB-DEBUG::MAP-BACKTRACE
     #<CLOSURE (LAMBDA # :IN BACKTRACE) {5AC7195D}>
     :START
     0
     :COUNT
     536870911)
1: (BACKTRACE 536870911 #<SB-IMPL::STRING-OUTPUT-STREAM {5AC718F9}>)
2: (TRIVIAL-BACKTRACE:PRINT-BACKTRACE-TO-STREAM
     #<SB-IMPL::STRING-OUTPUT-STREAM {5AC718F9}>)
3: (HUNCHENTOOT::GET-BACKTRACE)
4: ((FLET #:LAMBDA769 :IN HUNCHENTOOT:HANDLE-REQUEST)
     #<SB-INT:SIMPLE-CONTROL-ERROR
       "attempt to THROW to a tag that does not exist: ~S" {5AC675A1}>)
5: (SIGNAL
     #<SB-INT:SIMPLE-CONTROL-ERROR
       "attempt to THROW to a tag that does not exist: ~S" {5AC675A1}>)
6: (ERROR
     SB-INT:SIMPLE-CONTROL-ERROR
     :FORMAT-CONTROL
     "attempt to THROW to a tag that does not exist: ~S"
     :FORMAT-ARGUMENTS
     (HUNCHENTOOT-CGI::HANDLER-DONE))
7: (SB-KERNEL::UNSEEN-THROW-TAG-ERROR-HANDLER
     #<unavailable argument>
     #.(SB-SYS:INT-SAP #X293FF77C)
     #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X293FF470 :TYPE (*
                                                             (STRUCT
                                                              SB-VM::OS-CONTEXT-T-STRUCT))>
     (144))
8: (SB-KERNEL:INTERNAL-ERROR
     #.(SB-SYS:INT-SAP #X293FF470)
     #<unavailable argument>)
9: ("foreign function: call_into_lisp")
10: ("foreign function: funcall2")
11: ("foreign function: interrupt_internal_error")
12: ("foreign function: unblock_signals_in_context_and_maybe_warn")
13: ("no debug information for frame")
14: (HUNCHENTOOT-CGI::HANDLE-CGI-SCRIPT #P"/nay.py" #<unused argument>)
15: ((SB-PCL::FAST-METHOD HUNCHENTOOT:HANDLE-REQUEST
       (HUNCHENTOOT:ACCEPTOR HUNCHENTOOT:REQUEST))
      #<unavailable argument>
      #<unavailable argument>
      #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 8000)>
      #<HUNCHENTOOT:REQUEST {5AB29089}>)
16: ((SB-PCL::FAST-METHOD HUNCHENTOOT:PROCESS-REQUEST (T))
      #<unavailable argument>
      #<unavailable argument>
      #<HUNCHENTOOT:REQUEST {5AB29089}>)
17: (HUNCHENTOOT::DO-WITH-ACCEPTOR-REQUEST-COUNT-INCREMENTED
      #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 8000)>
      #<CLOSURE (LAMBDA # :IN HUNCHENTOOT:PROCESS-CONNECTION) {5A97D965}>)
18: ((SB-PCL::FAST-METHOD HUNCHENTOOT:PROCESS-CONNECTION
       (HUNCHENTOOT:ACCEPTOR T))
      #<unavailable argument>
      #<unavailable argument>
      #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 8000)>
      #<USOCKET:STREAM-USOCKET {5BFC8901}>)
19: ((SB-PCL::FAST-METHOD HUNCHENTOOT:PROCESS-CONNECTION :AROUND
       (HUNCHENTOOT:ACCEPTOR T))
      #<unavailable argument>
      #S(SB-PCL::FAST-METHOD-CALL
         :FUNCTION #<FUNCTION #>
         :PV NIL
         :NEXT-METHOD-CALL NIL
         :ARG-INFO (2))
      #<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 8000)>
      #<USOCKET:STREAM-USOCKET {5BFC8901}>)
20: ((LAMBDA () :IN HUNCHENTOOT:CREATE-REQUEST-HANDLER-THREAD))
21: ((LAMBDA () :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
22: ((FLET #:WITHOUT-INTERRUPTS-BODY-227081 :IN SB-THREAD:MAKE-THREAD))
23: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD:MAKE-THREAD))
24: ((FLET #:WITHOUT-INTERRUPTS-BODY-88760 :IN SB-THREAD::CALL-WITH-MUTEX))
25: (SB-THREAD::CALL-WITH-MUTEX
      #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD:MAKE-THREAD)
        {293FFDF5}>
      #<SB-THREAD:MUTEX "thread result lock"
          owner: #<SB-THREAD:THREAD "hunchentoot-worker-127.0.0.1:19474"  
RUNNING
                    {5BFD6639}>>
      #<SB-THREAD:THREAD "hunchentoot-worker-127.0.0.1:19474" RUNNING
         {5BFD6639}>
      T)
26: (SB-THREAD::INITIAL-THREAD-FUNCTION)
27: ("foreign function: call_into_lisp")
28: ("foreign function: funcall0")
29: ("foreign function: new_thread_trampoline")
30: ("foreign function: pthread_getprio")
Hunchentoot 1.2.2 running on SBCL 1.0.54


Any suggestion is appreciated!





More information about the Tbnl-devel mailing list