1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

Thanks goes to all of you you help building this (nice) framework - Update README and add errors on mux entry register

This commit is contained in:
Makis Maropoulos
2016-06-16 05:24:01 +03:00
parent dcded4e400
commit 647f0d704c
5 changed files with 56 additions and 32 deletions

View File

@@ -1042,7 +1042,7 @@ func StaticFS(reqPath string, systemPath string, stripSlashes int) RouteNameFunc
// * stripSlashes = 2, original path: "/foo/bar", result: ""
func (api *muxAPI) StaticFS(reqPath string, systemPath string, stripSlashes int) RouteNameFunc {
if reqPath[len(reqPath)-1] != slashByte {
reqPath += "/"
reqPath += slash
}
h := api.StaticHandler(systemPath, stripSlashes, true, true, nil)
@@ -1074,7 +1074,7 @@ func StaticWeb(reqPath string, systemPath string, stripSlashes int) RouteNameFun
// * if you don't know what to put on stripSlashes just 1
func (api *muxAPI) StaticWeb(reqPath string, systemPath string, stripSlashes int) RouteNameFunc {
if reqPath[len(reqPath)-1] != slashByte { // if / then /*filepath, if /something then /something/*filepath
reqPath += "/"
reqPath += slash
}
hasIndex := utils.Exists(systemPath + utils.PathSeparator + "index.html")