diff --git a/confluent/httpapi.py b/confluent/httpapi.py index f2d7146e..1a6cdfdb 100644 --- a/confluent/httpapi.py +++ b/confluent/httpapi.py @@ -57,7 +57,15 @@ def _get_query_dict(env, reqbody, reqtype): if "application/x-www-form-urlencoded" in reqtype: pbody = urlparse.parse_qs(reqbody) for ky in pbody.iterkeys(): - qdict[ky] = pbody[ky][0] + if len(pbody[ky]) > 1: # e.g. REST explorer + qdict[ky] = pbody[ky] + else: + qdict[ky] = pbody[ky][0] + if 'restexplorerignorekey' in qdict: + for key in qdict['restexplorerignorekey']: + if key in qdict: + del qdict[key] + del qdict['restexplorerignorekey'] return qdict @@ -162,6 +170,10 @@ def resourcehandler(env, start_response): cfgmgr = authorized['cfgmgr'] operation = opmap[env['REQUEST_METHOD']] querydict = _get_query_dict(env, reqbody, reqtype) + if 'restexplorerop' in querydict: + operation = querydict['restexplorerop'] + del querydict['restexplorerop'] + print repr(querydict) if '/console/session' in env['PATH_INFO']: #hard bake JSON into this path, do not support other incarnations prefix, _, _ = env['PATH_INFO'].partition('/console/session') @@ -217,9 +229,11 @@ def resourcehandler(env, start_response): if mimetype == 'text/html': yield '
' else: yield '[' diff --git a/confluent/messages.py b/confluent/messages.py index b1a46305..82001ed8 100644 --- a/confluent/messages.py +++ b/confluent/messages.py @@ -31,11 +31,14 @@ class ConfluentMessage(object): value = val['value'] if 'note' in val: note = '(' + val['note'] + ')' + snippet += "