tomasf/WebAppKit — Issue #6: Incorrectly handling of POST requests
Author: mikecsh
Created: 2011-10-10 14:02:08+00:00
State: open

Hi tomasf,

Thanks for your help on IRC the other day. After several hours analysing tcpflow traces I've narrowed down the problem. WAK does not handle POST parameters unless the Content-Type HTTP header is set to application/x-www-form-urlencoded. In fact there is a comment on line 265 of WARequest.m where this is checked which simply says "jesus. fix" :)

I don't know how to approach a patch for this as it currently calls the dictionaryFromQueryParameters method which obviously parses a standard query string. My application uses Content-Type application/json and the body is a JSON string. An NSString would seem a more appropriate return choice here.

What do you think the best approach is?

Thanks,
Mike