| 820 | |
| 821 | if (response.isBodyComplete()) |
| 822 | { |
| 823 | finishResponse(); |
| 824 | return; |
| 825 | } |
| 826 | |
| 827 | const bool addedBodyData = connection->getReadableTransportStream() |
| 828 | .eventData.addListener<HttpAsyncClient, &HttpAsyncClient::onResponseBodyData>(*this); |
| 829 | SC_HTTP_ASSERT_RELEASE(addedBodyData); |
| 830 | state = State::StreamingResponse; |
| 831 | } |
| 832 | |
| 833 | void HttpAsyncClient::onResponseBodyData(AsyncBufferView::ID bufferID) |
| 834 | { |
| 835 | Span<const char> readData; |
| 836 | Result readable = connection->buffersPool.getReadableData(bufferID, readData); |
| 837 | if (not readable) |
| 838 | { |
| 839 | fail(readable); |
| 840 | return; |
| 841 | } |
| 842 | |
| 843 | Result process = response.processBodyData(connection->getReadableTransportStream(), bufferID, readData, false); |
| 844 | if (not process) |
| 845 | { |
| 846 | fail(process); |
| 847 | return; |
| 848 | } |
| 849 | if (response.isBodyComplete()) |
nothing calls this directly
no test coverage detected