The problem was in my test cases, because it tries to mock MHD. Basically I just had to create fake instances like "struct MHD_Connection *con = sg_alloc(256)" and fixed the tests: https://github.com/risoflora/libsagui/commit/bd8304ebe439095312d7232aec5f88ad36a20157
On Tue, Feb 27, 2024 at 1:58 PM Markus Doppelbauer via libmicrohttpd < libmicrohttpd@gnu.org> wrote: > What was your issue? How did you fix it? > > I am getting "Assertion failed" from "connection.c:6864": > case MHD_CONNECTION_CHUNKED_BODY_UNREADY: > mhd_assert (0); > > This happens if I create a response from callback, e.g.: > > struct MHD_Response *response = MHD_create_response_from_callback( > MHD_SIZE_UNKNOWN, 32*1024, content_reader_callback, userdata, NULL ); > MHD_add_response_header( response, header.name, header.value ); > statuscode = MHD_queue_response( connection, 200, response ); > MHD_destroy_response( response ) > -- Silvio Clécio