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

Function start_forward_request

app/jaws/module/mod_http/http_proxy.c:928–958  ·  view source on GitHub ↗

���ӷ������ɹ�����ʼ�����������HTTP����ͷ */

Source from the content-addressed store, hash-verified

926
927/* ���ӷ������ɹ�����ʼ�����������HTTP����ͷ */
928static 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

Callers 1

Calls 5

acl_vstring_allocFunction · 0.85
http_hdr_entry_offFunction · 0.85
rebuild_requestFunction · 0.85
acl_aio_ctlFunction · 0.85
acl_aio_writenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…