| 182 | } |
| 183 | |
| 184 | static int th_http(int port, const char *request, char *resp, size_t respsz) { |
| 185 | char *prepared = th_request_with_ui_headers(port, request); |
| 186 | if (!prepared) |
| 187 | return 0; |
| 188 | int result = th_http_raw(port, prepared, resp, respsz); |
| 189 | free(prepared); |
| 190 | return result; |
| 191 | } |
| 192 | |
| 193 | /* HTTP status code from a raw response ("HTTP/1.1 404 ..."), or -1. */ |
| 194 | static int th_status(const char *resp) { |
no test coverage detected