accept POST. C, I hate you.

please don't judge me on this code, my c is rusty as hell.