MCPcopy Create free account
hub / github.com/apache/httpd / md_curl_req_cleanup

Function md_curl_req_cleanup

modules/md/md_curl.c:616–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616static void md_curl_req_cleanup(md_http_request_t *req)
617{
618 md_curl_internals_t *internals = req->internals;
619 if (internals) {
620 if (internals->curl) {
621 CURL *curl = md_http_get_impl_data(req->http);
622 if (curl == internals->curl) {
623 /* NOP: we have this curl at the md_http_t already */
624 }
625 else if (!curl) {
626 /* no curl at the md_http_t yet, install this one */
627 md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, req->pool, "register curl instance at http");
628 md_http_set_impl_data(req->http, internals->curl);
629 }
630 else {
631 /* There already is a curl at the md_http_t and it's not this one. */
632 curl_easy_cleanup(internals->curl);
633 }
634 }
635 if (internals->req_hdrs) curl_slist_free_all(internals->req_hdrs);
636 req->internals = NULL;
637 }
638}
639
640static void md_curl_cleanup(md_http_t *http, apr_pool_t *pool)
641{

Callers

nothing calls this directly

Calls 3

md_http_get_impl_dataFunction · 0.85
md_log_perrorFunction · 0.85
md_http_set_impl_dataFunction · 0.85

Tested by

no test coverage detected