| 20 | /* ��ǰ���������, �Ƿ������һ���ͻ�������? */ |
| 21 | |
| 22 | static 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 | |
| 67 | static void http_proxy_client_complete(HTTP_CLIENT *http_client, int keep_alive) |
| 68 | { |
no test coverage detected
searching dependent graphs…