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

Function http_proxy_complete

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

Source from the content-addressed store, hash-verified

106}
107
108static void http_proxy_complete(HTTP_CLIENT *http_client, int error_happen)
109{
110 /* ��Ҫ��ǰ֪����������Ϳͻ������Ƿ��Ѿ������룬��Ϊ���澭��
111 * http_proxy_server_complete �� http_proxy_client_complte ��
112 * http_client ��ռ�ڴ�����Ѿ����ͷţ�������ǰ֪�������/�ͻ�
113 * ������״̬���Ա����ڴ�Ƿ�����
114 */
115 int server_null = http_client->entry.server == NULL;
116 int client_null = http_client->entry.client == NULL;
117
118 /* �ж���������Ƿ�Ӧ���ֳ����� */
119
120 if (var_cfg_http_server_keepalive && !error_happen
121 && http_client->hdr_res
122 && http_client->hdr_res->hdr.keep_alive)
123 {
124 http_client->flag |= HTTP_FLAG_SERVER_KEEP_ALIVE;
125 }
126
127 /* �ж��ͻ������Ƿ�Ӧ���ֳ����� */
128
129 if (var_cfg_http_client_keepalive && !error_happen
130 && (http_client->flag & HTTP_FLAG_SERVER_KEEP_ALIVE)
131 && http_client->req_curr
132 && http_client->req_curr->hdr_req
133 && http_client->req_curr->hdr_req->hdr.keep_alive)
134 {
135 http_client->flag |= HTTP_FLAG_CLIENT_KEEP_ALIVE;
136 } else {
137 http_client->flag &= ~HTTP_FLAG_CLIENT_KEEP_ALIVE;
138 }
139
140 /* ������������������״̬�������رշ������ */
141
142 if (!server_null && !(http_client->flag & HTTP_FLAG_SERVER_LOCKED)) {
143 http_proxy_server_complete(http_client,
144 (http_client->flag & HTTP_FLAG_SERVER_KEEP_ALIVE));
145 }
146
147 /* ����ͻ�������������״̬�������رտͻ����� */
148
149 if (!client_null && !(http_client->flag & HTTP_FLAG_CLIENT_LOCKED)) {
150 http_proxy_client_complete(http_client,
151 (http_client->flag & HTTP_FLAG_CLIENT_KEEP_ALIVE));
152 }
153}
154
155/*---------------------------------------------------------------------------*/
156

Callers 15

read_respond_body_readyFunction · 0.85
get_respond_hdr_readyFunction · 0.85
read_respond_hdr_timeoutFunction · 0.85
read_respond_hdr_errorFunction · 0.85
read_request_body_readyFunction · 0.85
send_request_hdr_errorFunction · 0.85
on_close_serverFunction · 0.85

Calls 2

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…