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

Function http_proxy_server_complete

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

Source from the content-addressed store, hash-verified

20/* ��ǰ���������, �Ƿ������һ���ͻ�������? */
21
22static void http_proxy_server_complete(HTTP_CLIENT *http_client, int keep_alive)
23{
24 HTTP_SERVICE *service = (HTTP_SERVICE*) http_client->entry.service;
25 ACL_ASTREAM *server;
26 ACL_VSTREAM *sstream;
27
28 if (http_client->res) {
29 http_res_free(http_client->res);
30 http_client->res = NULL;
31 http_client->hdr_res = NULL;
32 } else if (http_client->hdr_res) {
33 http_hdr_res_free(http_client->hdr_res);
34 http_client->hdr_res = NULL;
35 }
36
37 server = http_client->entry.server;
38 /* �Ƿ�Ӧ�����˱��ֳ�����? */
39 if (server == NULL) {
40 return;
41 }
42
43 /* �Ƚ�ֹ�Ը��첽���������� */
44 acl_aio_disable_readwrite(server);
45
46 /* ����첽�������й��ӻص���������ֹ����������ص������� */
47 acl_aio_clean_hooks(server);
48
49 sstream = acl_aio_vstream(server);
50
51 if (keep_alive) {
52 int timeout = 60;
53 /* ������������ */
54 client_entry_detach(&http_client->entry, sstream);
55 ACL_VSTRING_RESET(&server->strbuf);
56
57 /* �������˵��������������ӳ��� */
58 conn_cache_push_stream(service->service.conn_cache,
59 server, timeout, NULL, NULL);
60 } else {
61 client_entry_detach(&http_client->entry, sstream);
62 /* �ر��첽�� */
63 acl_aio_iocp_close(server);
64 }
65}
66
67static void http_proxy_client_complete(HTTP_CLIENT *http_client, int keep_alive)
68{

Callers 1

http_proxy_completeFunction · 0.85

Calls 8

http_res_freeFunction · 0.85
http_hdr_res_freeFunction · 0.85
acl_aio_clean_hooksFunction · 0.85
acl_aio_vstreamFunction · 0.85
client_entry_detachFunction · 0.85
conn_cache_push_streamFunction · 0.85
acl_aio_iocp_closeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…