mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
api server count on with invalid Content-Length
This commit is contained in:
parent
726633182f
commit
5f46bca934
1 changed files with 6 additions and 4 deletions
|
|
@ -59,11 +59,13 @@ class Handler(http.server.SimpleHTTPRequestHandler):
|
|||
"""Because processing is technically the same for now so it is used
|
||||
the same way
|
||||
"""
|
||||
content_length = int(self.headers["Content-Length"])
|
||||
in_data_str = self.rfile.read(content_length)
|
||||
in_data = None
|
||||
if in_data_str:
|
||||
in_data = json.loads(in_data_str)
|
||||
cont_len = self.headers.get("Content-Length")
|
||||
if cont_len:
|
||||
content_length = int(cont_len)
|
||||
in_data_str = self.rfile.read(content_length)
|
||||
if in_data_str:
|
||||
in_data = json.loads(in_data_str)
|
||||
|
||||
registered_callbacks = self.server.registered_callbacks[rest_method]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue