I am creating a RESTful API in PHP, and have encountered a problem. When the client is posting data to the server, the server should return:
Status code 201
I am sorry to bear bad news, but look here:
Prevent IIS from changing response when Location header is present
Edit: Never did find an answer - I ended up switching to Apache
And it seems IIS has had its fingers into headers for a long time:
http://forums.iis.net/t/1158431.aspx
This is a bug in IIS FastCGI module. It will be fixed in Windows 7 RTM. We are also looking into possible ways for making this fix available for IIS 7.
Hopefully if the bugs are related (I expect they are), if you now have FastCGI, then the fix below could work. Otherwise, switching to PHP non-FastCGI module might also work, and it might be easier than throwing in with Apache.
http://support.microsoft.com/kb/980363