MCPcopy Create free account
hub / github.com/acl-dev/acl / http_hdr_req_clone

Function http_hdr_req_clone

lib_protocol/src/http/http_hdr_req.c:288–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288HTTP_HDR_REQ *http_hdr_req_clone(const HTTP_HDR_REQ* hdr_req)
289{
290 HTTP_HDR_REQ *hh;
291
292 hh = http_hdr_req_new();
293 http_hdr_clone(&hdr_req->hdr, &hh->hdr);
294
295 hh->port = hdr_req->port;
296 ACL_SAFE_STRNCPY(hh->method, hdr_req->method, sizeof(hh->method));
297 ACL_SAFE_STRNCPY(hh->host, hdr_req->host, sizeof(hh->host));
298 acl_vstring_strcpy(hh->url_part, acl_vstring_str(hdr_req->url_part));
299 acl_vstring_strcpy(hh->url_path, acl_vstring_str(hdr_req->url_path));
300 acl_vstring_strcpy(hh->url_params, acl_vstring_str(hdr_req->url_params));
301 acl_vstring_strcpy(hh->file_path, acl_vstring_str(hdr_req->file_path));
302
303 if (hdr_req->params_table) {
304 hh->params_table = acl_htable_create(__http_hdr_max_request, 0);
305 acl_htable_walk(hdr_req->params_table, clone_table_entry,
306 (void*) hh->params_table);
307 }
308 if (hdr_req->cookies_table) {
309 hh->cookies_table = acl_htable_create(__http_hdr_max_cookies, 0);
310 acl_htable_walk(hdr_req->cookies_table, clone_table_entry,
311 (void*) hh->cookies_table);
312 }
313
314 return hh;
315}
316
317/* �ͷ�һ�� HTTP_HDR_REQ �ṹ */
318

Callers 1

http_hdr_req_rewriteFunction · 0.85

Calls 5

http_hdr_req_newFunction · 0.85
http_hdr_cloneFunction · 0.85
acl_vstring_strcpyFunction · 0.85
acl_htable_createFunction · 0.85
acl_htable_walkFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…