1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-12 01:22:21 +02:00

Merge pull request #243 from swenson/master

OPTIONS should route to the options handler
This commit is contained in:
Vishal Rana 2015-10-23 18:19:57 -07:00
commit 980edb686a

View File

@ -224,7 +224,7 @@ func (n *node) addHandler(method string, h HandlerFunc) {
case PATCH:
n.methodHandler.patch = h
case OPTIONS:
n.methodHandler.delete = h
n.methodHandler.options = h
case HEAD:
n.methodHandler.head = h
case CONNECT:
@ -247,7 +247,7 @@ func (n *node) findHandler(method string) HandlerFunc {
case PATCH:
return n.methodHandler.patch
case OPTIONS:
return n.methodHandler.delete
return n.methodHandler.options
case HEAD:
return n.methodHandler.head
case CONNECT: