         (content-length (:content-length data))
         (last-modified (:last-modified data)))))
 
-(defn- get-resources [path loader]
+(defn- get-resources [path ^ClassLoader loader]
   (-> (or loader (.getContextClassLoader (Thread/currentThread)))
       (.getResources path)
       (enumeration-seq)))

  [resp name value]
  (assoc-in resp [:headers name] (str value)))

(defn- canonical-path [^File file]
  (str (.getCanonicalPath file)
       (if (.isDirectory file) File/separatorChar)))


      (let [root (.replaceAll (str root) "^/" "")]
        (or (str/blank? root)
            (let [path (canonical-path body)]
              (some #(and (= "file" (.getProtocol ^URL %))
                          (.startsWith path (canonical-path (url-as-file %))))
                    (get-resources root loader)))))))

