From 700d44cb6db0e9f7b8b700b3231c32615df6e4f9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 3 Nov 2013 00:52:59 -0400 Subject: [PATCH] More work on bringing rest explorer up to capable --- confluent/httpapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/confluent/httpapi.py b/confluent/httpapi.py index 92968700..f2d7146e 100644 --- a/confluent/httpapi.py +++ b/confluent/httpapi.py @@ -52,6 +52,7 @@ def _get_query_dict(env, reqbody, reqtype): for qpair in qstring.split('&'): qkey, qvalue = qpair.split('=') qdict[qkey] = qvalue + print reqbody if reqbody is not None: if "application/x-www-form-urlencoded" in reqtype: pbody = urlparse.parse_qs(reqbody) @@ -159,6 +160,7 @@ def resourcehandler(env, start_response): headers.extend(("Set-Cookie", m.OutputString()) for m in authorized['cookie'].values()) cfgmgr = authorized['cfgmgr'] + operation = opmap[env['REQUEST_METHOD']] querydict = _get_query_dict(env, reqbody, reqtype) if '/console/session' in env['PATH_INFO']: #hard bake JSON into this path, do not support other incarnations @@ -200,7 +202,6 @@ def resourcehandler(env, start_response): return else: # normal request - operation = opmap[env['REQUEST_METHOD']] url = env['PATH_INFO'] url = url.replace('.json', '') url = url.replace('.html', '') @@ -219,7 +220,7 @@ def resourcehandler(env, start_response): for rsp in hdlr: yield rsp.html() yield "
\n" - yield '' + yield '' else: yield '[' docomma = False