|
|
@ -81,12 +81,16 @@ func (s *HTTPServer) KVSGet(resp http.ResponseWriter, req *http.Request, args *s
|
|
|
|
|
|
|
|
|
|
|
|
// KVSGetKeys handles a GET request for keys
|
|
|
|
// KVSGetKeys handles a GET request for keys
|
|
|
|
func (s *HTTPServer) KVSGetKeys(resp http.ResponseWriter, req *http.Request, args *structs.KeyRequest) (interface{}, error) {
|
|
|
|
func (s *HTTPServer) KVSGetKeys(resp http.ResponseWriter, req *http.Request, args *structs.KeyRequest) (interface{}, error) {
|
|
|
|
// Check for a seperator
|
|
|
|
// Check for a seperator, due to historic spelling error,
|
|
|
|
|
|
|
|
// we now are forced to check for both spellings
|
|
|
|
var sep string
|
|
|
|
var sep string
|
|
|
|
params := req.URL.Query()
|
|
|
|
params := req.URL.Query()
|
|
|
|
if _, ok := params["seperator"]; ok {
|
|
|
|
if _, ok := params["seperator"]; ok {
|
|
|
|
sep = params.Get("seperator")
|
|
|
|
sep = params.Get("seperator")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if _, ok := params["separator"]; ok {
|
|
|
|
|
|
|
|
sep = params.Get("separator")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Construct the args
|
|
|
|
// Construct the args
|
|
|
|
listArgs := structs.KeyListRequest{
|
|
|
|
listArgs := structs.KeyListRequest{
|
|
|
|