mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-14 21:38:19 +00:00
@ -493,15 +493,6 @@ class Compute:
|
|||||||
elif isinstance(data, io.BufferedIOBase):
|
elif isinstance(data, io.BufferedIOBase):
|
||||||
chunked = True
|
chunked = True
|
||||||
headers['content-type'] = 'application/octet-stream'
|
headers['content-type'] = 'application/octet-stream'
|
||||||
|
|
||||||
def send_data(f):
|
|
||||||
while True:
|
|
||||||
chunk = f.read(4096)
|
|
||||||
if not chunk:
|
|
||||||
break
|
|
||||||
yield chunk
|
|
||||||
|
|
||||||
data = send_data(data)
|
|
||||||
else:
|
else:
|
||||||
data = json.dumps(data).encode("utf-8")
|
data = json.dumps(data).encode("utf-8")
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user