mirror of
https://github.com/labstack/echo.git
synced 2025-07-07 01:06:40 +02:00
Added support for the REPORT method (#1332)
This commit is contained in:
3
echo.go
3
echo.go
@ -170,6 +170,8 @@ const (
|
|||||||
charsetUTF8 = "charset=UTF-8"
|
charsetUTF8 = "charset=UTF-8"
|
||||||
// PROPFIND Method can be used on collection and property resources.
|
// PROPFIND Method can be used on collection and property resources.
|
||||||
PROPFIND = "PROPFIND"
|
PROPFIND = "PROPFIND"
|
||||||
|
// REPORT Method can be used to get information about a resource, see rfc 3253
|
||||||
|
REPORT = "REPORT"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Headers
|
// Headers
|
||||||
@ -251,6 +253,7 @@ var (
|
|||||||
PROPFIND,
|
PROPFIND,
|
||||||
http.MethodPut,
|
http.MethodPut,
|
||||||
http.MethodTrace,
|
http.MethodTrace,
|
||||||
|
REPORT,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ type (
|
|||||||
propfind HandlerFunc
|
propfind HandlerFunc
|
||||||
put HandlerFunc
|
put HandlerFunc
|
||||||
trace HandlerFunc
|
trace HandlerFunc
|
||||||
|
report HandlerFunc
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -247,6 +248,8 @@ func (n *node) addHandler(method string, h HandlerFunc) {
|
|||||||
n.methodHandler.put = h
|
n.methodHandler.put = h
|
||||||
case http.MethodTrace:
|
case http.MethodTrace:
|
||||||
n.methodHandler.trace = h
|
n.methodHandler.trace = h
|
||||||
|
case REPORT:
|
||||||
|
n.methodHandler.report = h
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,6 +275,8 @@ func (n *node) findHandler(method string) HandlerFunc {
|
|||||||
return n.methodHandler.put
|
return n.methodHandler.put
|
||||||
case http.MethodTrace:
|
case http.MethodTrace:
|
||||||
return n.methodHandler.trace
|
return n.methodHandler.trace
|
||||||
|
case REPORT:
|
||||||
|
return n.methodHandler.report
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user