all/windows: Be case in-sensitive about pattern matching. (#3682)

Resource strings and paths are case insensitive on windows
deployments but if user happens to use upper case instead of
lower case for certain configuration params like bucket
policies and bucket notification config. We might not honor
them which leads to a wrong behavior on windows.

This is windows only behavior, for all other platforms case
is still kept sensitive.
This commit is contained in:
Harshavardhana
2017-02-03 23:27:50 -08:00
committed by GitHub
parent b6ebf2aba8
commit 533338bdeb
15 changed files with 48 additions and 97 deletions

View File

@@ -18,7 +18,6 @@ package cmd
import (
"net/http"
"strings"
"github.com/gorilla/mux"
)
@@ -44,7 +43,7 @@ func validateListObjectsArgs(prefix, marker, delimiter string, maxKeys int) APIE
// Marker is set validate pre-condition.
if marker != "" {
// Marker not common with prefix is not implemented.
if !strings.HasPrefix(marker, prefix) {
if !hasPrefix(marker, prefix) {
return ErrNotImplemented
}
}