mfavant / tubekit

NEW PROJECT https://github.com/crust-hub/avant
MIT License
0 stars 0 forks source link

http task err stop #20

Closed gaowanlu closed 6 months ago

gaowanlu commented 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;