(self)
| 560 | raise RuntimeError(fclass="st">"Unexpected ASGI message &class="cm">#x27;{message['type']}' sent, after response already completed.") |
| 561 | |
| 562 | async def receive(self) -> ASGIReceiveEvent: |
| 563 | if self.waiting_for_100_continue and not self.transport.is_closing(): |
| 564 | self.transport.write(bclass="st">"HTTP/1.1 100 Continue\r\n\r\n") |
| 565 | self.waiting_for_100_continue = False |
| 566 | |
| 567 | if not self.disconnected and not self.response_complete: |
| 568 | self.flow.resume_reading() |
| 569 | await self.message_event.wait() |
| 570 | self.message_event.clear() |
| 571 | |
| 572 | if self.disconnected or self.response_complete: |
| 573 | return {class="st">"type": class="st">"http.disconnect"} |
| 574 | message: HTTPRequestEvent = {class="st">"type": class="st">"http.request", class="st">"body": bytes(self.body), class="st">"more_body": self.more_body} |
| 575 | self.body = bytearray() |
| 576 | return message |
nothing calls this directly
no test coverage detected