| 5 | #include "http/lib_http_util.h" |
| 6 | |
| 7 | void http_util_free(HTTP_UTIL *http_util) |
| 8 | { |
| 9 | if ((http_util->flag & HTTP_UTIL_FLAG_SET_DUMP_FILE)) { |
| 10 | if (http_util->dump_stream) |
| 11 | acl_vstream_close(http_util->dump_stream); |
| 12 | } |
| 13 | |
| 14 | if (http_util->stream) |
| 15 | acl_vstream_close(http_util->stream); |
| 16 | if (http_util->req_buf) |
| 17 | acl_vstring_free(http_util->req_buf); |
| 18 | if (http_util->hdr_req) |
| 19 | http_hdr_req_free(http_util->hdr_req); |
| 20 | if (http_util->http_res) |
| 21 | http_res_free(http_util->http_res); |
| 22 | else if (http_util->hdr_res) |
| 23 | http_hdr_res_free(http_util->hdr_res); |
| 24 | acl_myfree(http_util); |
| 25 | } |
| 26 | |
| 27 | HTTP_UTIL *http_util_req_new(const char *url, const char *method) |
| 28 | { |
no test coverage detected
searching dependent graphs…