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

Function md_http_create

modules/md/md_http.c:61–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61apr_status_t md_http_create(md_http_t **phttp, apr_pool_t *p, const char *user_agent,
62 const char *proxy_url)
63{
64 md_http_t *http;
65 apr_status_t rv = APR_SUCCESS;
66
67 if (!cur_impl) {
68 *phttp = NULL;
69 return APR_ENOTIMPL;
70 }
71
72 if (!cur_init_done) {
73 if (APR_SUCCESS == (rv = cur_impl->init())) {
74 cur_init_done = 1;
75 }
76 else {
77 return rv;
78 }
79 }
80
81 http = apr_pcalloc(p, sizeof(*http));
82 http->pool = p;
83 http->impl = cur_impl;
84 http->user_agent = apr_pstrdup(p, user_agent);
85 http->proxy_url = proxy_url? apr_pstrdup(p, proxy_url) : NULL;
86 http->bucket_alloc = apr_bucket_alloc_create(p);
87 if (!http->bucket_alloc) {
88 return APR_EGENERAL;
89 }
90 apr_pool_cleanup_register(p, http, http_cleanup, apr_pool_cleanup_null);
91 *phttp = http;
92 return APR_SUCCESS;
93}
94
95apr_status_t md_http_clone(md_http_t **phttp,
96 apr_pool_t *p, md_http_t *source_http)

Callers 3

md_http_cloneFunction · 0.85
md_ocsp_renewFunction · 0.85
md_acme_setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected