���ӷ������ɹ�����ʼ�����������HTTP����ͷ */
| 926 | |
| 927 | /* ���ӷ������ɹ�����ʼ�����������HTTP����ͷ */ |
| 928 | static void start_forward_request(HTTP_CLIENT *http_client) |
| 929 | { |
| 930 | /* ���䶯̬�ڴ� */ |
| 931 | if (http_client->buf == NULL) { |
| 932 | http_client->buf = acl_vstring_alloc(HTTP_HDRLEN_DEF); |
| 933 | } else { |
| 934 | ACL_VSTRING_RESET(http_client->buf); |
| 935 | } |
| 936 | |
| 937 | if (var_cfg_http_proxy_connection_off) { |
| 938 | /* ��Ҫ��һЩ�Ƚ���������GFW�Ķ����ƺ��������ֶ������⣬�����ӳ� */ |
| 939 | http_hdr_entry_off(&http_client->req_curr->hdr_req->hdr, "Proxy-Connection"); |
| 940 | } |
| 941 | |
| 942 | /* ���´��� HTTP ����ͷ�� http_client->buf �� */ |
| 943 | rebuild_request(http_client->req_curr->hdr_req, http_client->buf); |
| 944 | |
| 945 | /* ���ûص����� */ |
| 946 | acl_aio_ctl(http_client->entry.server, |
| 947 | ACL_AIO_CTL_WRITE_HOOK_ADD, send_request_hdr_complete, http_client, |
| 948 | ACL_AIO_CTL_CLOSE_HOOK_ADD, send_request_hdr_error, http_client, |
| 949 | ACL_AIO_CTL_END); |
| 950 | |
| 951 | /* ��������� */ |
| 952 | http_client->flag |= HTTP_FLAG_SERVER_LOCKED; |
| 953 | |
| 954 | /* �������ת���ͻ��˵�HTTP����ͷ���� */ |
| 955 | acl_aio_writen(http_client->entry.server, |
| 956 | acl_vstring_str(http_client->buf), |
| 957 | (int) ACL_VSTRING_LEN(http_client->buf)); |
| 958 | } |
| 959 | |
| 960 | /*----------------------------------------------------------------------------*/ |
| 961 |
no test coverage detected
searching dependent graphs…