MCPcopy Create free account
hub / github.com/aria2/aria2 / getTransferEncodingStreamFilter

Function getTransferEncodingStreamFilter

src/HttpResponseCommand.cc:88–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86namespace {
87
88std::unique_ptr<StreamFilter> getTransferEncodingStreamFilter(
89 HttpResponse* httpResponse,
90 std::unique_ptr<StreamFilter> delegate = nullptr)
91{
92 if (httpResponse->isTransferEncodingSpecified()) {
93 auto filter = httpResponse->getTransferEncodingStreamFilter();
94 if (!filter) {
95 throw DL_ABORT_EX(fmt(EX_TRANSFER_ENCODING_NOT_SUPPORTED,
96 httpResponse->getTransferEncoding().c_str()));
97 }
98 filter->init();
99 filter->installDelegate(std::move(delegate));
100 return filter;
101 }
102
103 return delegate;
104}
105
106std::unique_ptr<StreamFilter>
107getContentEncodingStreamFilter(HttpResponse* httpResponse,

Callers 4

executeInternalMethod · 0.85
handleDefaultEncodingMethod · 0.85
handleOtherEncodingMethod · 0.85
skipResponseBodyMethod · 0.85

Calls 5

fmtFunction · 0.85
initMethod · 0.45
installDelegateMethod · 0.45

Tested by

no test coverage detected