Skip to content

Commit

Permalink
Renamed old 'app' argument to 'handler' in wrap-file
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed Feb 10, 2013
1 parent 27ef395 commit 0e89a44
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ring-core/src/ring/middleware/file.clj
Expand Up @@ -21,14 +21,14 @@
(response/file-response path opts)))))

(defn wrap-file
"Wrap an app such that the directory at the given root-path is checked for a
static file with which to respond to the request, proxying the request to the
wrapped app if such a file does not exist.
"Wrap an handler such that the directory at the given root-path is checked for
a static file with which to respond to the request, proxying the request to
the wrapped handler if such a file does not exist.
An map of options may be optionally specified. These options will be passed
to the ring.util.response/file-response function."
[app ^String root-path & [opts]]
[handler ^String root-path & [opts]]
(ensure-dir root-path)
(fn [req]
(or (file-request req root-path opts)
(app req))))
(handler req))))

0 comments on commit 0e89a44

Please sign in to comment.