| 223 | } |
| 224 | |
| 225 | bool |
| 226 | FetchSM::check_chunked() |
| 227 | { |
| 228 | static const char CHUNKED_TEXT[] = "chunked"; |
| 229 | static size_t const CHUNKED_LEN = sizeof(CHUNKED_TEXT) - 1; |
| 230 | |
| 231 | if (resp_is_chunked < 0) { |
| 232 | resp_is_chunked = static_cast<int>( |
| 233 | this->check_for_field_value(MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING, CHUNKED_TEXT, CHUNKED_LEN)); |
| 234 | |
| 235 | if (resp_is_chunked && (fetch_flags & TS_FETCH_FLAGS_DECHUNK)) { |
| 236 | ChunkedHandler *ch = &chunked_handler; |
| 237 | ch->init_by_action(resp_reader, ChunkedHandler::ACTION_DECHUNK, HttpTunnel::DROP_CHUNKED_TRAILERS, |
| 238 | HttpTunnel::PARSE_CHUNK_STRICTLY); |
| 239 | ch->dechunked_reader = ch->dechunked_buffer->alloc_reader(); |
| 240 | ch->state = ChunkedHandler::CHUNK_READ_SIZE; |
| 241 | resp_reader->dealloc(); |
| 242 | } |
| 243 | } |
| 244 | return resp_is_chunked > 0; |
| 245 | } |
| 246 | |
| 247 | bool |
| 248 | FetchSM::check_connection_close() |
nothing calls this directly
no test coverage detected