libhttpserver icon indicating copy to clipboard operation
libhttpserver copied to clipboard

Closes #268: Fix POST processing of final keys without values

Open JavierJF opened this issue 3 years ago • 0 comments

Identify the Bug

https://github.com/etr/libhttpserver/issues/268

Description of the Change

The change is simple, instead of calling 'MHD_destroy_post_processor' in the destructor after the request has been processed, it's called before calling the registered processing callback.

Alternate Designs

I haven't think in alternate designs. I chose to call 'MHD_destroy_post_processor' right before mr->callback because I think it's the only place requiring of the final post processing of the request. Thus, keeping the two operation close makes sense.

Possible Drawbacks

If all the information is going to be used just by mr->callback, can't think of any drawback.

Verification Process

Sorry, internal testing, just testing over the endpoints in a third party application.

Release Notes

  • Fixed processing of final keys without values for POST body processing of kind 'application/x-www-form-urlencoded'

JavierJF avatar May 13 '22 15:05 JavierJF