diff --git a/confluent/httpapi.py b/confluent/httpapi.py index a84f2f44..1fcf5732 100644 --- a/confluent/httpapi.py +++ b/confluent/httpapi.py @@ -246,6 +246,17 @@ def resourcehandler(env, start_response): start_response('200 OK', headers) yield '{"session":"%s","data":""}' % sessid return + elif 'bytes' in querydict.keys(): # not keycodes... + input = querydict['bytes'] + sessid = querydict['session'] + if sessid not in consolesessions: + start_response('400 Expired Session', headers) + return + consolesessions[sessid]['expiry'] = time.time() + 90 + consolesessions[sessid]['session'].write(input) + start_response('200 OK', headers) + yield json.dumps({'session': querydict['session']}) + return # client has requests to send or receive, not both... elif 'keys' in querydict.keys(): # client wishes to push some keys into the remote console input = ""