   #^{:doc "Asset management"}
   cascade.asset
   (:import
+    (java.net URL URLConnection)
     (javax.servlet ServletContext)
     (javax.servlet.http HttpServletRequest HttpServletResponse))
   (:require


(assoc-in-config :asset-blacklist
  [#"\.class$", #"\.clj$"])

;; Assets represents files stored either under the web context or stored within the classpath.
;; Identifying an asset will eventually incorporate a locale-specific search. Ultimately,

        _ (fail-unless (= application-version (read-config :application-version)) "Incorrect application version.")
        asset-url (url-provider asset-path)
        _ (fail-if (nil? asset-url) "Could not locate %s asset %s." domain-name asset-path)
        mime-type (get-mime-type asset-path)]
    (with-open [output-stream (open-output-stream-for-asset response asset-url mime-type)]  
      (with-open [input-stream (.openStream asset-url)]
        (copy input-stream output-stream)
        (.flush output-stream))))
  ; If we got this far, we copied the contents (or failed, throwing an exception)
  true)

(defn classpath-asset-dispatcher
  [env]
