libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] MHD_RESPMEM_PERSISTENT


From: Miguel Sancho
Subject: [libmicrohttpd] MHD_RESPMEM_PERSISTENT
Date: Tue, 24 Jan 2017 12:17:14 +0100

Hi,
using the MHD_RESPMEM_PERSISTENT option I am getting an error. The following HTTP response gives a corrupt file when downloading from libmicrohttpd.0.9.50. However same code with MHD_RESPMEM_MUST_COPY option works fine:

response = MHD_create_response_from_buffer(size,(void*)buffer,
                                                                           MHD_RESPMEM_PERSISTENT);
ret = MHD_queue_response (connection, 200, response);       
MHD_destroy_response (response);
free(buffer);

The buffer isn't changed for at least the lifetime of the response, what is wrong here?

Thanks

Miguel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]