I have a PHP-based RESTful web service that runs on IIS that responds to a POST request with something like
Status: 201 Created Location: [url of created object] Content-length: [correct] { my: "created object" }
It seems that due to the Location header, IIS adds the text in the response so that 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 adding so much text, but IIS seems to keep the original length of the content when the content changes, creating an invalid response and thereby forcing the web service user to give me a violation error protocol.
Is there a way to prevent IIS from rejecting my answer?
Edit: I never found an answer - I switched to Apache
source share