| 6844 | } |
| 6845 | |
| 6846 | HttpTunnelProducer * |
| 6847 | HttpSM::setup_cache_transfer_to_transform() |
| 6848 | { |
| 6849 | int64_t alloc_index; |
| 6850 | int64_t doc_size; |
| 6851 | |
| 6852 | ink_assert(cache_sm.cache_read_vc != nullptr); |
| 6853 | ink_assert(transform_info.vc != nullptr); |
| 6854 | ink_assert(transform_info.entry->vc == transform_info.vc); |
| 6855 | |
| 6856 | // grab this here |
| 6857 | cache_response_hdr_bytes = t_state.hdr_info.cache_response.length_get(); |
| 6858 | |
| 6859 | doc_size = t_state.cache_info.object_read->object_size_get(); |
| 6860 | alloc_index = buffer_size_to_index(doc_size, t_state.http_config_param->max_payload_iobuf_index); |
| 6861 | MIOBuffer *buf = new_MIOBuffer(alloc_index); |
| 6862 | IOBufferReader *buf_start = buf->alloc_reader(); |
| 6863 | |
| 6864 | HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_response_wait_for_transform_read); |
| 6865 | |
| 6866 | HttpTunnelProducer *p = tunnel.add_producer(cache_sm.cache_read_vc, doc_size, buf_start, &HttpSM::tunnel_handler_cache_read, |
| 6867 | HT_CACHE_READ, "cache read"); |
| 6868 | |
| 6869 | tunnel.add_consumer(transform_info.vc, cache_sm.cache_read_vc, &HttpSM::tunnel_handler_transform_write, HT_TRANSFORM, |
| 6870 | "transform write"); |
| 6871 | transform_info.entry->in_tunnel = true; |
| 6872 | cache_sm.cache_read_vc = nullptr; |
| 6873 | |
| 6874 | return p; |
| 6875 | } |
| 6876 | |
| 6877 | void |
| 6878 | HttpSM::setup_cache_write_transfer(HttpCacheSM *c_sm, VConnection *source_vc, HTTPInfo *store_info, int64_t skip_bytes, |
nothing calls this directly
no test coverage detected