| 191 | } |
| 192 | |
| 193 | void HTTPRequest::cancel_request() { |
| 194 | timer->stop(); |
| 195 | |
| 196 | if (!requesting) { |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | if (!use_threads.is_set()) { |
| 201 | set_process_internal(false); |
| 202 | } else { |
| 203 | thread_request_quit.set(); |
| 204 | if (thread.is_started()) { |
| 205 | thread.wait_to_finish(); |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | file.unref(); |
| 210 | decompressor.unref(); |
| 211 | client->close(); |
| 212 | body.clear(); |
| 213 | got_response = false; |
| 214 | response_code = -1; |
| 215 | request_sent = false; |
| 216 | requesting = false; |
| 217 | } |
| 218 | |
| 219 | bool HTTPRequest::_handle_response(bool *ret_value) { |
| 220 | if (!client->has_response()) { |
no test coverage detected