You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a body to a request on ASGI, the body is not making it through. I have not yet tested if this also applies with streaming requests.
The problem is here:
asyncdefread(self) ->Optional[bytes]:
""" Read and stream the body in chunks from an incoming ASGI message. """message=awaitself.transport.receive()
ifnotmessage.get("more_body", False):
self.request_body=FalsereturnNone# <<<< we are not returning the bodyreturnmessage.get("body", b"")
If a small message comes through that has not hit this read() more than once (again, I am assuming that a streaming request might actually work), the message will look like this:
See source
This bug only applies to ASGI when sending.
When sending a body to a request on ASGI, the body is not making it through. I have not yet tested if this also applies with streaming requests.
The problem is here:
If a small message comes through that has not hit this
read()
more than once (again, I am assuming that a streaming request might actually work), the message will look like this:Therefore, we need to return the
body
even ifmore_body
isFalse
(and also properly setself.request_body
.More testing is needed
The text was updated successfully, but these errors were encountered: