1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00
Former-commit-id: d8d73b3e1b713af9bf7b4712121324079ede6a41
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-11-28 23:20:08 +02:00
parent 1843a7d1f1
commit 8b85b602df
4 changed files with 20 additions and 21 deletions

View File

@@ -733,10 +733,10 @@ func checkIfRange(ctx context.Context, etagEmptyOrStrongMatch func(ifRangeValue
return condFalse
}
const indexPage = "/index.html"
// name is '/'-separated, not filepath.Separator.
func serveFile(ctx context.Context, fs http.FileSystem, name string, redirect bool, showList bool, gzip bool) (string, int) {
const indexPage = "/index.html"
// redirect .../index.html to .../
// can't use Redirect() because that would make the path absolute,
// which would be a problem running under StripPrefix