-;; HTTP handler library for Compojure
+;; compojure.http
+;;
+;; Compojure library for constructing HTTP servlet proxy objects. 
+;; 
+;; Here's a small taste of the syntax:
+;;
+;;   (defservlet example
+;;     "An example servlet that contains a bit of everything."
+;;     (GET "/"
+;;       "Hello World")
+;;     (GET "/:name"
+;;       (str "Hello " (route :name)))
+;;     (GET "/image"
+;;       (file "public/image.png"))
+;;     (GET "/error"
+;;       [500 "Error 500"])
+;;     (POST "/mesg"
+;;       (redirect-to "/"))
+;;     (GET "/header"
+;;       [{"X-Fortune" "Be prepared!"}
+;;        "Custom X-Header"])
+;;     (PUT "/:var"
+;;       (dosync
+;;         (commute session assoc :var (route :var)))
+;;     (ANY "/*"
+;;       (page-not-found))
+
 (ns compojure.http
   (:use (compojure control
                    file-utils

  ([]         (page-not-found "public/404.html"))
  ([filename] [404 (file filename)]))
 
(defn serve-file
  "Attempts to serve up a static file from a directory. Nil is returned if the
  file does not exist."
  ([path]
    (serve-file "public" path))
  ([root path]
    (let [static-file (file root path)]
      (if (.isFile static-file)
        static-file))))
 
;;;; Servlet creation ;;;;
 

                          response))))
 
(defmacro defservlet
  "Shortcut for (def name doc? (servlet handlers))"
  [name doc & handlers]
  (if (string? doc)
    `(def
