从当Location头存在更改响应防止IIS(Prevent IIS from changing r

2019-09-17 05:29发布

我有写在一个基于PHP的框架运行在IIS上一个RESTful Web服务这是为了响应POST请求喜欢的东西

Status: 201 Created
Location: [url of created object]
Content-length: [correct]

{ my: "created object" }

这似乎是因为Location头将IIS添加文本,使其成为响应(为了清楚起见HTML删除)的:

Status: 201 Created
Location: [url of created object]
Content-length: [incorrect!]

Document Moved
Object Moved This document may be found here
{ my: "created object" }

我不介意添加文本的那么多,但IIS似乎保持了原有的内容长度而改变的内容,创建一个无效的响应,从而导致网络服务的消费者给我违反协议的错误。

是否有办法防止IIS重整我的反应?

编辑:始终没找到答案-我最终切换到Apache

文章来源: Prevent IIS from changing response when Location header is present
标签: php iis rest iis-7