2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-14 19:57:50 +00:00

Accept alternative javascript input for alternative terminal

implementation.
This commit is contained in:
Jarrod Johnson 2014-02-23 21:48:01 -05:00
parent 9292d89751
commit a8ee40250c

View File

@ -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 = ""