W7 Pro IIS 7.5 overwrites PHP Location: Header

前端 未结 3 535
日久生厌
日久生厌 2021-01-05 18:30

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          


        
3条回答
  •  醉话见心
    2021-01-05 19:07

    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

提交回复
热议问题