| 1261 | } |
| 1262 | |
| 1263 | static void http_proxy_req_get(HTTP_CLIENT *http_client) |
| 1264 | { |
| 1265 | HTTP_CLIENT_REQ *req = http_client_req_new(http_client); |
| 1266 | |
| 1267 | req->flag |= CLIENT_READ_WAIT; |
| 1268 | req->hdr_req = http_hdr_req_new(); |
| 1269 | acl_fifo_push(&http_client->req_list, req); |
| 1270 | |
| 1271 | /* ���ôӿͻ���������ʧ�ܻ������������ʱ�Ļص����� */ |
| 1272 | acl_aio_add_close_hook(http_client->entry.client, |
| 1273 | on_close_client, http_client); |
| 1274 | |
| 1275 | /* �����ͻ����� */ |
| 1276 | http_client->flag |= HTTP_FLAG_CLIENT_LOCKED; |
| 1277 | |
| 1278 | http_client->total_size = 0; |
| 1279 | http_client->flag &= ~HTTP_FLAG_CLIENT_KEEP_ALIVE; |
| 1280 | http_client->flag &= ~HTTP_FLAG_SERVER_KEEP_ALIVE; |
| 1281 | |
| 1282 | /* ��ʼ��ȡHTTP����ͷ */ |
| 1283 | http_hdr_req_get_async(req->hdr_req, |
| 1284 | http_client->entry.client, |
| 1285 | request_header_ready, |
| 1286 | req, |
| 1287 | http_client->entry.service->rw_timeout); |
| 1288 | } |
| 1289 | |
| 1290 | int http_proxy_start(HTTP_CLIENT *http_client) |
| 1291 | { |
no test coverage detected
searching dependent graphs…