| 186 | } |
| 187 | |
| 188 | std::unique_ptr<StreamFilter> |
| 189 | HttpResponse::getTransferEncodingStreamFilter() const |
| 190 | { |
| 191 | // TODO Transfer-Encoding header field can contains multiple tokens. We should |
| 192 | // parse the field and retrieve each token. |
| 193 | if (isTransferEncodingSpecified()) { |
| 194 | if (util::strieq(getTransferEncoding(), "chunked")) { |
| 195 | return make_unique<ChunkedDecodingStreamFilter>(); |
| 196 | } |
| 197 | } |
| 198 | return nullptr; |
| 199 | } |
| 200 | |
| 201 | bool HttpResponse::isContentEncodingSpecified() const |
| 202 | { |