| 196 | } |
| 197 | |
| 198 | static int th_http(int port, const char *request, char *resp, size_t respsz) { |
| 199 | char *prepared = th_request_with_ui_headers(port, request); |
| 200 | if (!prepared) |
| 201 | return 0; |
| 202 | int result = th_http_raw(port, prepared, resp, respsz); |
| 203 | free(prepared); |
| 204 | return result; |
| 205 | } |
| 206 | |
| 207 | /* HTTP status code from a raw response ("HTTP/1.1 404 ..."), or -1. */ |
| 208 | static int th_status(const char *resp) { |
no test coverage detected