Add fs separator

This commit is contained in:
Harshavardhana
2015-10-17 12:01:19 -07:00
parent c2859c1f7d
commit 1256ca86d0
4 changed files with 14 additions and 11 deletions
+5 -1
View File
@@ -131,9 +131,13 @@ func IgnoreResourcesHandler(h http.Handler) http.Handler {
return resourceHandler{h}
}
const (
separator = "/"
)
// Resource handler ServeHTTP() wrapper
func (h resourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
splits := strings.SplitN(r.URL.Path, "/", 3)
splits := strings.SplitN(r.URL.Path, separator, 3)
switch len(splits) {
// bucket exists
case 2: