I'm not sure what the problem is, then.. I thought you said the request 'hangs on'? So that's not the case..? Your server IS responding to the request?
You don't need to 'terminate' the post-iterator callback function yourself from inside the callback. It will stop being called when there is no more data to parse.
I do basically the same thing you're trying to do - put the post parameters into a map. The callback doesn't get to decide when the post data has been completely processed - that's decided by your server (probably in your connection callback). Maybe you're missing the step where you set the 'data size' pointer to 0 to tell MHD you've absorbed all the data from that chunk of the POST request?
The second-to-last parameter in the connection callback is a size_t* that represents the 'upload data size'. You need to set the value to 0 if you absorbed all the data - very probably after you call 'MHD_post_process'. Something like this:
if(*uploadDataSize != 0) {
// process the post data using MHD's default post-processor - this will call your post-processor-callback function
result = MHD_post_process(pointerToYourPostProcessorForThisConnection, uploadData, *uploadDataSize);