| 5088 | } |
| 5089 | |
| 5090 | void |
| 5091 | HttpSM::do_cache_prepare_update() |
| 5092 | { |
| 5093 | if (t_state.cache_info.object_read != nullptr && t_state.cache_info.object_read->valid() && |
| 5094 | t_state.cache_info.object_store.valid() && t_state.cache_info.object_store.response_get() != nullptr && |
| 5095 | t_state.cache_info.object_store.response_get()->valid() && |
| 5096 | t_state.hdr_info.client_request.method_get_wksidx() == HTTP_WKSIDX_GET) { |
| 5097 | t_state.cache_info.object_store.request_set(t_state.cache_info.object_read->request_get()); |
| 5098 | // t_state.cache_info.object_read = NULL; |
| 5099 | // cache_sm.close_read(); |
| 5100 | |
| 5101 | t_state.transact_return_point = HttpTransact::HandleUpdateCachedObject; |
| 5102 | ink_assert(cache_sm.cache_write_vc == nullptr); |
| 5103 | HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_cache_open_write); |
| 5104 | // don't retry read for update |
| 5105 | do_cache_prepare_action(&cache_sm, t_state.cache_info.object_read, false); |
| 5106 | } else { |
| 5107 | t_state.api_modifiable_cached_resp = false; |
| 5108 | call_transact_and_set_next_state(HttpTransact::HandleApiErrorJump); |
| 5109 | } |
| 5110 | } |
| 5111 | |
| 5112 | void |
| 5113 | HttpSM::do_cache_prepare_action(HttpCacheSM *c_sm, CacheHTTPInfo *object_read_info, bool retry, bool allow_multiple) |
nothing calls this directly
no test coverage detected