Typing
This commit is contained in:
parent
08353637fd
commit
7e93ee102c
|
@ -255,7 +255,7 @@ class ASGIApp:
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
async def read(self) -> None:
|
async def read(self) -> Optional[bytes]:
|
||||||
"""
|
"""
|
||||||
Read and stream the body in chunks from an incoming ASGI message.
|
Read and stream the body in chunks from an incoming ASGI message.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -248,7 +248,7 @@ class Http:
|
||||||
if size:
|
if size:
|
||||||
return b"%x\r\n%b\r\n0\r\n\r\n" % (size, data)
|
return b"%x\r\n%b\r\n0\r\n\r\n" % (size, data)
|
||||||
return b"0\r\n\r\n"
|
return b"0\r\n\r\n"
|
||||||
return b"%x\r\n%b\r\n" % (size, data) if size else None
|
return b"%x\r\n%b\r\n" % (size, data) if size else b""
|
||||||
|
|
||||||
def http1_response_normal(self, data: bytes, end_stream: bool) -> bytes:
|
def http1_response_normal(self, data: bytes, end_stream: bool) -> bytes:
|
||||||
"""Format / keep track of non-chunked response."""
|
"""Format / keep track of non-chunked response."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user