| 286 | } |
| 287 | |
| 288 | HTTP_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 |
no test coverage detected
searching dependent graphs…