confirm to ring spec, fixes #83

This commit is contained in:
Tommi Reiman 2018-06-05 09:39:39 +03:00
parent 8d58cbc71f
commit b2c0b2fdfa
2 changed files with 6 additions and 3 deletions

View file

@ -17,6 +17,9 @@
### `reitit-ring`
* Use HTTP redirect (302) with index-files in `reitit.ring/create-resource-handler`.
* `reitit.ring/create-default-handler` now conforms to [RING Spec](https://github.com/ring-clojure/ring/blob/master/SPEC), Fixes [#83](https://github.com/metosin/reitit/issues/83)
https://github.com/metosin/reitit/issues/83
### `reitit-schema`

View file

@ -46,9 +46,9 @@
| `:not-acceptable` | 406, handler returned `nil`"
([]
(create-default-handler
{:not-found (constantly {:status 404, :body ""})
:method-not-allowed (constantly {:status 405, :body ""})
:not-acceptable (constantly {:status 406, :body ""})}))
{:not-found (constantly {:status 404, :body "", :headers {}})
:method-not-allowed (constantly {:status 405, :body "", :headers {}})
:not-acceptable (constantly {:status 406, :body "", :headers {}})}))
([{:keys [not-found method-not-allowed not-acceptable]}]
(fn
([request]