Common Lisp Package: CLACK.HANDLER.APACHE

# Clack.Handler.Apache - Clack handler for Apache2 + mod_lisp. ## SYNOPSIS (clackup #'(lambda (env) '(200 (:content-type "text/plain") ("Hello, Clack!"))) :server :apache :port 3000) ## DESCRIPTION Clack.Handler.Apache is a Clack handler for Apache2 + mod_lisp. This handler depends on the library "cl-modlisp", so it only works on CMUCL, SBCL, AllegroCL and LispWorks. You should make sure the Apache server and [mod_lisp](http://www.fractalconcept.com/asp/html/mod_lisp.html) are installed on your machine. The configuration of Apache might be like this. LoadModule lisp_module /usr/libexec/apache2/mod_lisp2.so ... Listen 12345 NameVirtualHost *:12345 <VirtualHost *:12345> ErrorLog "/tmp/mod-lisp.log" LispServer 127.0.0.1 3000 "www" <Location /> SetHandler lisp-handler </Location> </VirtualHost> This configuration opens port 12345 to web browsers, and listens for the Lisp process on port 3000. ## AUTHOR Eitarow Fukamachi (e.arrows@gmail.com)

README:

FUNCTION

Public

RUN (APP &KEY DEBUG (PORT 3000))

Start talking to mod_lisp process. Note the `port` is for socket, not Apache's.

STOP (SERVER)

Close socket to talk with mod_lisp.

Private

CLACK-REQUEST-DISPATCHER (COMMAND APP &KEY DEBUG)

Apache(mod_lisp) request dispatcher for Clack. Process modlisp command alist. This function is called on each request.

HANDLE-RESPONSE (RES)

Function for managing response. Take response and output it to `ml:*modlisp-socket*'.

MAKE-KEYWORD (NAME)

Interns the string designated by NAME in the KEYWORD package.

MAKE-REQUEST-DISPATCHER (&OPTIONAL DEBUG)

Return a function which calls `clack-request-dispatcher`.

URL-DECODE (STRING &OPTIONAL (EXTERNAL-FORMAT *DEFAULT-EXTERNAL-FORMAT*))

Decodes a URL-encoded STRING which is assumed to be encoded using the external format EXTERNAL-FORMAT.

Undocumented

COMMAND->PLIST (COMMAND)

GENERIC-FUNCTION

Private

CALL (COMP ENV)

Invoke component. Designed to be overriden in subclasses.