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

Function getContentEncodingStreamFilter

src/HttpResponseCommand.cc:106–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106std::unique_ptr<StreamFilter>
107getContentEncodingStreamFilter(HttpResponse* httpResponse,
108 std::unique_ptr<StreamFilter> delegate = nullptr)
109{
110 if (httpResponse->isContentEncodingSpecified()) {
111 auto filter = httpResponse->getContentEncodingStreamFilter();
112 if (!filter) {
113 A2_LOG_INFO(fmt("Content-Encoding %s is specified, but the current "
114 "implementation doesn't support it. The decoding "
115 "process is skipped and the downloaded content will be "
116 "still encoded.",
117 httpResponse->getContentEncoding().c_str()));
118 }
119 else {
120 filter->init();
121 filter->installDelegate(std::move(delegate));
122 return filter;
123 }
124 }
125 return delegate;
126}
127
128} // namespace
129

Callers 2

executeInternalMethod · 0.85
handleOtherEncodingMethod · 0.85

Calls 5

fmtFunction · 0.85
initMethod · 0.45
installDelegateMethod · 0.45

Tested by

no test coverage detected