agent: Correct spelling of separator. Fixes #101.

This commit is contained in:
Armon Dadgar 2014-05-07 15:25:17 -07:00
parent fe35d55663
commit 01e085cc64
3 changed files with 10 additions and 3 deletions

View File

@ -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.

View File

@ -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{

View File

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