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

Function req_create

modules/md/md_http.c:211–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static apr_status_t req_create(md_http_request_t **preq, md_http_t *http,
212 const char *method, const char *url,
213 struct apr_table_t *headers)
214{
215 md_http_request_t *req;
216 apr_pool_t *pool;
217 apr_status_t rv;
218
219 rv = apr_pool_create(&pool, http->pool);
220 if (rv != APR_SUCCESS) {
221 return rv;
222 }
223 apr_pool_tag(pool, "md_http_req");
224
225 req = apr_pcalloc(pool, sizeof(*req));
226 req->pool = pool;
227 req->id = http->next_id++;
228 req->bucket_alloc = http->bucket_alloc;
229 req->http = http;
230 req->method = method;
231 req->url = url;
232 req->headers = headers? apr_table_copy(req->pool, headers) : apr_table_make(req->pool, 5);
233 req->resp_limit = http->resp_limit;
234 req->user_agent = http->user_agent;
235 req->proxy_url = http->proxy_url;
236 req->timeout = http->timeout;
237 req->ca_file = http->ca_file;
238 req->unix_socket_path = http->unix_socket_path;
239 *preq = req;
240 return rv;
241}
242
243void md_http_req_destroy(md_http_request_t *req)
244{

Callers 4

md_http_GET_createFunction · 0.85
md_http_HEAD_createFunction · 0.85
md_http_POST_createFunction · 0.85
md_http_POSTd_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected