Some HTTP fixes.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4708 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2023-12-30 19:18:09 +00:00
parent d02f17a8cf
commit 4f3f4295ea

View File

@ -390,7 +390,7 @@ static size_t _http_on_read_plain_internal(tf_http_connection_t* connection, con
{ {
connection->callback = _http_builtin_404_handler; connection->callback = _http_builtin_404_handler;
} }
size_t consumed = read_size - (connection->headers_buffer_length - connection->parsed_length) - (read_size - used_read_size); size_t consumed = read_size - (connection->headers_buffer_length - parse_result) - (read_size - used_read_size);
_http_add_body_bytes(connection, NULL, 0); _http_add_body_bytes(connection, NULL, 0);
return consumed; return consumed;
} }
@ -458,7 +458,6 @@ static void _http_on_read(uv_stream_t* stream, ssize_t read_size, const uv_buf_t
static void _http_timer_callback(uv_timer_t* timer) static void _http_timer_callback(uv_timer_t* timer)
{ {
tf_printf("_http_timer_callback\n");
_http_connection_destroy(timer->data, "_http_timer_callback"); _http_connection_destroy(timer->data, "_http_timer_callback");
} }