libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] issue with post processor callback function return v


From: Christian Grothoff
Subject: Re: [libmicrohttpd] issue with post processor callback function return value?
Date: Thu, 4 Feb 2021 18:44:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Hi Conor,

I've looked through the code and found one scenario where the return
value of the application callback was basically incorrectly ignored (but
for others it worked correctly).  This is fixed in Git master:
e0669386..5782daed

You can test if you have a sufficiently recent version using

#if MHD_VERSION >= 0x00097203


Please let us know if this does NOT address this regression for you.


Thanks!

Christian

On 2/1/21 9:32 AM, Conor Lennon via libmicrohttpd wrote:
> I'm working on porting an application that uses libmicrohttpd 0.9.63 to 0.9.72
> 
> The application does the following:
> Calls MHD_create_post_processor, passing in a callback function.
> 
> That callback function takes in the posted values and does some validation.
> If that validation fails, the callback function returns MHD_NO
> Otherwise MHD_YES is returned
> 
> MHD_post_process is called
> That results in the callback function being called.
> 
> With 0.9.63, when the callback function returns MHD_NO, MHD_post_process 
> returns MHD_NO
> However, with 0.9.72 that is not happening.
> I'm always seeing MHD_YES coming back from MHD_post_process
> 
> Is that expected?
> Is this something I should investigate further on my side?
> 
> Looking at the libmicrohttpd tests, I can see that only the test_overflow 
> function in test_postprocessor.cĀ  checks the returnĀ  code of
> MHD_post_process and that test always seems to return success, independent of 
> the MHD_post_process return value.
> 
> Regards,
> 
> Conor
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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