Sorry.. I don't have time to debug your code for you. If you have a seg fault, do you have a core dump? If so, why not look at it in gdb or some other debugger? Failing that, just use print statements to figure out where the problem is. If you need programming help in general, check out Stack Overflow (as the purpose of this mailing list is to help with MHD). The code you posted really isn't very extensive. It shouldn't be too hard to debug it. If you don't know how to do that, I can pretty much guarantee that you're going to want to step away from MHD and get some more experience in general first.
That said, segmentation faults are usually the result of trying to access memory that isn't what you think it is - with an uninitialized pointer or something that got deleted/freed that you didn't intend.
I'm not asking the following questions to get the answers to them - like I said, you're going to need to debug your own code - but some things for you to think about:
* Where are you storing the map of key/value pairs? Is it in some type of request object you created? (I didn't see where that was created in the code you posted.)
* Is the post processor callback being called at all? (Have you verified that?)
* If so, do the values ever get inserted into your map? (Have you checked that when you insert them?)
* Do you truly understand MHD's 'connection callback' flow - are you creating and destroying objects and assigning pointers when you're supposed to? (If not, make sure you read MHD's documentation and understand what's going on in the tutorials.)
Like I said earlier - MHD is great, but POST processing with it is not trivial/easy/simple. You have to understand what's going on in order to use it correctly. Maybe you're trying to run before you can walk...
I can promise you that MHD's code works and will not seg-fault internally if you're using it correctly (and it might not even if you screw up). MHD is very solid - the problem is definitely in your code. You need to figure out where the seg fault is - figure out which pointer is messed up and why.
That's probably not much help or what you were looking for, but that's the most I can offer you. Hope it helped.
Ken