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

Function rebuild_request

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

Source from the content-addressed store, hash-verified

886/* ���¹���HTTP����ͷ */
887
888static 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����ͷ */
928static void start_forward_request(HTTP_CLIENT *http_client)

Callers 1

start_forward_requestFunction · 0.85

Calls 4

http_hdr_entry_offFunction · 0.85
acl_vstring_sprintfFunction · 0.85
acl_vstring_strcatFunction · 0.85
acl_foreachFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…