Update server.py

This commit is contained in:
Namhyeon Go 2024-02-26 16:40:45 +09:00 committed by GitHub
parent ad21e1439f
commit a5482220df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,6 +142,12 @@ def parse_first_data(data):
return parsed_data
def conn_string(conn, data, addr):
# check is it JSON-RPC 2.0 request
if data.find(b'{') == 0:
context = json.loads(data.decode(client_encoding))
if "jsonrpc" in context:
pass # todo
# parse first data (header)
webserver, port, scheme, method, url = parse_first_data(data)