| 115 | } |
| 116 | |
| 117 | static int get_body_ready(int status, char *data acl_unused, |
| 118 | int dlen acl_unused, void *arg) |
| 119 | { |
| 120 | const char *myname = "get_body_ready"; |
| 121 | PROBE_SERVER *server = (PROBE_SERVER *) arg; |
| 122 | |
| 123 | #if 0 |
| 124 | if (var_probe_debug_fp && status !=HTTP_STATUS_OK && dlen > 0) { |
| 125 | acl_vstream_writen(var_probe_debug_fp, data, dlen); |
| 126 | } |
| 127 | #else |
| 128 | acl_msg_info("%s: len(%d), status=%d", myname, dlen, status); |
| 129 | #endif |
| 130 | |
| 131 | if (status == HTTP_CHAT_OK) { |
| 132 | msg_info(server, "%s(%d), get body over, body_len(%d)", |
| 133 | myname, __LINE__, dlen); |
| 134 | |
| 135 | close_stream(server); |
| 136 | printf("---------------read over(%d) -----------------\r\n", dlen); |
| 137 | timer_retry(server); |
| 138 | } else if (status >= HTTP_CHAT_ERR_IO) { |
| 139 | msg_error(server, "%s(%d), get body error(io), status(%d)", |
| 140 | myname, __LINE__, status); |
| 141 | |
| 142 | close_stream(server); |
| 143 | timer_retry(server); |
| 144 | return -1; |
| 145 | } |
| 146 | |
| 147 | return 0; |
| 148 | } |
| 149 | |
| 150 | static int get_header_ready(int status, void *arg) |
| 151 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…