Function: %url-dispatcher

Source

(defun %url-dispatcher (url-prefix urlmap *request* *entity*)
  (declare (special *request*) (special *entity*)) 
  ;; setup the dynamic enviornment that allows functional interface to http request.
  ;; *cookies*
  ;; *parameters*
  ;; *session*
  ;;
  ;; Be *really* careful about package issues. A wethod will set
  ;; *package* to be the package where it's defined. In general,
  ;; things should work as expected as long as all http-data stuff
  ;; are strings. 
  (let ((*parameters* (parse-request-parameters (request-query *request*)))
	(*readtable* *readtable*)) 
    (declare (special *parameters*))
    (setf (readtable-case *readtable*) :invert)
    #+(or)(print "fuck this")
    (handler-case 
	(match-url-dispatch 
	 (remove-url-prefix (net.uri:uri-path (request-uri *request*)) url-prefix)
	 urlmap)
      (werror (c)
	(render-error c)))))
Source Context