Strip path from initial request and consistency changes

This commit is contained in:
Henrique Dias
2017-06-27 10:45:06 +01:00
parent 6bce6fb584
commit 5f98fd89a8
7 changed files with 50 additions and 51 deletions

View File

@@ -77,7 +77,7 @@ func command(ctx *requestContext, w http.ResponseWriter, r *http.Request) (int,
}
// Gets the path and initializes a buffer.
path := strings.Replace(r.URL.Path, ctx.FileManager.BaseURL, ctx.User.scope, 1)
path := ctx.User.scope + "/" + r.URL.Path
path = filepath.Clean(path)
buff := new(bytes.Buffer)