change func name

Former-commit-id: c29d08e4cc06d4684dbc6b616250e1b6c946e1b1 [formerly 17173a37e5fe13b6f490484042415d623c4f9506] [formerly c786cae817921e43270563cb76368eaebdf93968 [formerly 1673b9afa3]]
Former-commit-id: ebaaf6ed7012bd7baa7236a558f37f82cef4c224 [formerly 63ec0b72e8b0013848f2011c3941e7136edb9a68]
Former-commit-id: 05d881534fb8dafe533aa94cd0965ea2afa2e551
This commit is contained in:
Henrique Dias 2017-07-26 11:28:59 +01:00
parent da6f4aa4d5
commit 42bab1458e

View File

@ -101,7 +101,7 @@ func apiHandler(c *RequestContext, w http.ResponseWriter, r *http.Request) (int,
return http.StatusForbidden, nil
}
c.Router, r.URL.Path = cleanURL(r.URL.Path)
c.Router, r.URL.Path = splitURL(r.URL.Path)
if !c.User.Allowed(r.URL.Path) {
return http.StatusForbidden, nil
@ -175,9 +175,9 @@ func checksumHandler(c *RequestContext, w http.ResponseWriter, r *http.Request)
return 0, nil
}
// cleanURL splits the path and returns everything that stands
// splitURL splits the path and returns everything that stands
// before the first slash and everything that goes after.
func cleanURL(path string) (string, string) {
func splitURL(path string) (string, string) {
if path == "" {
return "", ""
}