Closed gaowanlu closed 6 months ago
else if (t_http_connection->buffer_used_len > 0) { int nparsed = http_parser_execute(t_http_connection->get_parser(), settings, t_http_connection->buffer, t_http_connection->buffer_used_len); if (t_http_connection->get_parser()->upgrade) { // TODO:to stop } else if (nparsed != t_http_connection->buffer_used_len) // error { t_http_connection->buffer_used_len = 0; // TODO:to stop break; } } else { // 1. t_http_connection->buffer_used_len == 0 client closed t_http_connection->set_recv_end(true); t_http_connection->set_process_end(true); t_http_connection->set_response_end(true); t_http_connection->set_everything_end(true); break; } t_http_connection->buffer_used_len = 0;