mirror of
https://0xacab.org/johnxina/rat.git
synced 2024-12-23 13:09:08 +00:00
Backport proxify to older python version
This commit is contained in:
parent
d63dc1bad4
commit
f2d6ec3169
@ -99,13 +99,12 @@ class Asgiproxify():
|
|||||||
})
|
})
|
||||||
async for chunk, _ in resp.content.iter_chunks():
|
async for chunk, _ in resp.content.iter_chunks():
|
||||||
try:
|
try:
|
||||||
async with asyncio.timeout(10):
|
await asyncio.wait_for(send({
|
||||||
await send({
|
|
||||||
'type': 'http.response.body',
|
'type': 'http.response.body',
|
||||||
'body': chunk,
|
'body': chunk,
|
||||||
'more_body': True,
|
'more_body': True,
|
||||||
})
|
}), timeout=10)
|
||||||
except TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
return
|
return
|
||||||
await send({'type': 'http.response.body'})
|
await send({'type': 'http.response.body'})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user