I have a RESTful web service written in a PHP-based framework running on IIS which responds to a POST request with something like
Status: 201 Created
Location: [url of created object]
Content-length: [correct]
{ my: "created object" }
It seems because of the Location header IIS is adding text to the response so it becomes (HTML removed for clarity):
Status: 201 Created
Location: [url of created object]
Content-length: [incorrect!]
Document Moved
Object Moved This document may be found here
{ my: "created object" }
I don't mind the addition of the text so much, but IIS seems to be keeping the original content-length while changing the content, creating an invalid response and thus causing the consumer of the web service to give me a protocol violation error.
Is there a way to prevent IIS from mangling my response?
Edit: Never did find an answer - I ended up switching to Apache