agent: Correct spelling of separator. Fixes #101.

pull/139/head
Armon Dadgar 11 years ago
parent 3d527e174a
commit d5a8e79b65

@ -4,6 +4,9 @@ FEATURES:
BUG FIXES:
* Renaming "seperator" to "separator". This is the correct spelling,
but both spellings are respected for backwards compatibility. [GH-101]
IMPROVEMENTS:
* Improved the URL formatting for the key/value editor in the Web UI.

@ -81,12 +81,16 @@ func (s *HTTPServer) KVSGet(resp http.ResponseWriter, req *http.Request, args *s
// KVSGetKeys handles a GET request for keys
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
params := req.URL.Query()
if _, ok := params["seperator"]; ok {
sep = params.Get("seperator")
}
if _, ok := params["separator"]; ok {
sep = params.Get("separator")
}
// Construct the args
listArgs := structs.KeyListRequest{

@ -149,8 +149,8 @@ key.
It is possible to also only list keys without any values by using the
"?keys" query parameter along with a `GET` request. This will return
a list of the keys under the given prefix. The optional "?seperator="
can be used to list only up to a given seperator.
a list of the keys under the given prefix. The optional "?separator="
can be used to list only up to a given separator.
For example, listing "/web/" with a "/" seperator may return:

Loading…
Cancel
Save