   [resp name value]
   (assoc-in resp [:headers name] (str value)))
 
-(defn- canonical-path [^File file]
+(defn- canonical-path ^String [^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 %))
                          (.startsWith path (canonical-path (url-as-file %))))
                    (get-resources root loader)))))))


        (content-length (:content-length data))
        (last-modified (:last-modified data)))))

(defn- get-resources [path ^ClassLoader loader]
  (-> (or loader (.getContextClassLoader (Thread/currentThread)))
      (.getResources path)
      (enumeration-seq)))
