格式错误的nginx 307redirect响应?

我有一个Nginxconfiguration307redirecthttp到https。 现有的客户端应用程序连接到http并通过POST请求发送数据。 客户端是使用HttpWebRequest的.Net服务。 只需使用301redirect结果就可以从请求中删除POST数据。

我有我的本地testing环境中工作的307redirect,但是当部署到生产服务器的redirect消息被损坏,客户端抛出exception。

这是我在testing环境中得到的工作响应: 工作307重定向

这就是我从生产环境中得到的 在这里输入图像说明

你可以看到数据包看起来不同,可能会导致不同的响应? 旧版本的nginx

在1.1.16之前版本的nginx没有正确支持返回307个响应。

更改日志读取相关部分:

Changes with nginx 1.1.16 29 Feb 2012 *) Feature: the "return" and "error_page" directives can now be used to return 307 redirections. 

如果您需要此function,我build议您将您的产品(和您的开发!)服务器更新到最新版本 。 nginx 1.0.5在这一点上已经很老了。