| 886 | /* ���¹���HTTP����ͷ */ |
| 887 | |
| 888 | static void rebuild_request(HTTP_HDR_REQ *hdr_req, ACL_VSTRING *buf) |
| 889 | { |
| 890 | ACL_ITER iter; |
| 891 | HTTP_HDR_ENTRY *entry; |
| 892 | int i = 0; |
| 893 | |
| 894 | /* XXX: nginx ��ʱ�Ժ��� Proxy-Connection ��������ʱ�����ӳ�? */ |
| 895 | #if 0 |
| 896 | http_hdr_entry_off(&hdr_req->hdr, "Proxy-Connection"); |
| 897 | #endif |
| 898 | |
| 899 | #if 0 |
| 900 | acl_vstring_sprintf(buf, "%s http://%s%s HTTP/%d.%d\r\n", |
| 901 | hdr_req->method, hdr_req->host, |
| 902 | acl_vstring_str(hdr_req->url_part), |
| 903 | hdr_req->hdr.version.major, |
| 904 | hdr_req->hdr.version.minor); |
| 905 | #else |
| 906 | acl_vstring_sprintf(buf, "%s %s HTTP/%d.%d\r\n", |
| 907 | hdr_req->method, |
| 908 | acl_vstring_str(hdr_req->url_part), |
| 909 | hdr_req->hdr.version.major, |
| 910 | hdr_req->hdr.version.minor); |
| 911 | #endif |
| 912 | |
| 913 | acl_foreach(iter, hdr_req->hdr.entry_lnk) { |
| 914 | if (i++ == 0) |
| 915 | continue; |
| 916 | entry = (HTTP_HDR_ENTRY*) iter.data; |
| 917 | if (entry->off) |
| 918 | continue; |
| 919 | acl_vstring_strcat(buf, entry->name); |
| 920 | acl_vstring_strcat(buf, ": "); |
| 921 | acl_vstring_strcat(buf, entry->value); |
| 922 | acl_vstring_strcat(buf, "\r\n"); |
| 923 | } |
| 924 | acl_vstring_strcat(buf, "\r\n"); |
| 925 | } |
| 926 | |
| 927 | /* ���ӷ������ɹ�����ʼ�����������HTTP����ͷ */ |
| 928 | static void start_forward_request(HTTP_CLIENT *http_client) |
no test coverage detected
searching dependent graphs…