libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] MHD_RESPMEM_PERSISTENT


From: silvioprog
Subject: Re: [libmicrohttpd] MHD_RESPMEM_PERSISTENT
Date: Tue, 24 Jan 2017 12:25:16 -0300

Could you show what error and how the buffer was assigned?

On Tue, Jan 24, 2017 at 8:17 AM, Miguel Sancho <address@hidden> wrote:
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




--
Silvio Clécio

reply via email to

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