| 155 | } |
| 156 | |
| 157 | void |
| 158 | ProxySession::handle_api_return(int event) |
| 159 | { |
| 160 | TSHttpHookID hookid = hook_state.id(); |
| 161 | |
| 162 | SET_HANDLER(&ProxySession::state_api_callout); |
| 163 | |
| 164 | cur_hook = nullptr; |
| 165 | |
| 166 | switch (hookid) { |
| 167 | case TS_HTTP_SSN_START_HOOK: |
| 168 | if (event == TS_EVENT_HTTP_ERROR) { |
| 169 | this->do_io_close(); |
| 170 | } else { |
| 171 | this->start(); |
| 172 | } |
| 173 | break; |
| 174 | case TS_HTTP_SSN_CLOSE_HOOK: { |
| 175 | free(); // You can now clean things up |
| 176 | break; |
| 177 | } |
| 178 | default: |
| 179 | Fatal("received invalid session hook %s (%d)", HttpDebugNames::get_api_hook_name(hookid), hookid); |
| 180 | break; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | bool |
| 185 | ProxySession::is_chunked_encoding_supported() const |
no test coverage detected