| 820 | if (not responseDecoder->AsyncReadableStream::eventError |
| 821 | .addListener<HttpAsyncClient, &HttpAsyncClient::onCompressedResponseError>(*this)) |
| 822 | return Result::Error(HttpResultCategory, HttpError::ClientDecoderListenerUnavailable); |
| 823 | if (not responseDecoder->AsyncWritableStream::eventError |
| 824 | .addListener<HttpAsyncClient, &HttpAsyncClient::onCompressedResponseError>(*this)) |
| 825 | return Result::Error(HttpResultCategory, HttpError::ClientDecoderListenerUnavailable); |
| 826 | |
| 827 | response.attachReadableStream(*responseDecoder); |
| 828 | responseDecoderActive = true; |
| 829 | return Result(true); |
| 830 | } |
| 831 | |
| 832 | Result HttpAsyncClient::startResponseStreams() |
| 833 | { |
| 834 | if (responseDecoderActive) |
| 835 | { |
| 836 | if (responseDecoder->AsyncReadableStream::canStart()) |
| 837 | { |
| 838 | SC_TRY(responseDecoder->AsyncReadableStream::start()); |
| 839 | } |
| 840 | else |
| 841 | { |
| 842 | responseDecoder->AsyncReadableStream::resumeReading(); |
| 843 | } |
| 844 | } |
| 845 | return response.startBodyStream(); |
| 846 | } |
| 847 | |
| 848 | void HttpAsyncClient::detachResponseDecompression() |
| 849 | { |
nothing calls this directly
no test coverage detected