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:
parent
9292d89751
commit
a8ee40250c
@ -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 = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user