Add fs separator

This commit is contained in:
Harshavardhana committed 2015-10-17 12:05:12 -07:00
1 parent c2859c1f7d
commit 1256ca86d0
4 files changed
+14 -11

No files matched your search

+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: